@Only-api
@Post
@Get
@Delete
@MedicationAdministration
Feature: Medication Administration resource actions
Description: This feature checks the patient resource actions, get, post and delete made on FHIR specific MedicationAdministration node. This resource is part of the Chemotherapy.
File name: xah.feature
Relative path: api/xah.feature
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:33:49.051 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CB01",
"display": "Etoposide"
}
]
},
"effectivePeriod": {
"start": "2012-12-05",
"end": "2012-10-25"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:33:49.658 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:33:49.658 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VZWwUpWtXXxaAace"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19682/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:33:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19682/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:33:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:33:49.658 [print] {
"resourceType": "MedicationAdministration",
"id": "19682",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:33:52.785+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CB01",
"display": "Etoposide"
}
]
},
"effectivePeriod": {
"start": "2012-12-05",
"end": "2012-10-25"
}
}
> *
print COOKIES
10:33:49.658 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:33:49.659 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:33:49.660 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VZWwUpWtXXxaAace"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19682/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:33:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19682/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:33:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:33:49.660 [print] {
"resourceType": "MedicationAdministration",
"id": "19682",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:33:52.785+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CB01",
"display": "Etoposide"
}
]
},
"effectivePeriod": {
"start": "2012-12-05",
"end": "2012-10-25"
}
}
> *
print COOKIES
10:33:49.660 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:33:50.587 [print] {
"resourceType": "MedicationAdministration",
"id": "19682",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:33:52.785+02:00",
"source": "#VZWwUpWtXXxaAace",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CB01",
"display": "Etoposide"
}
]
},
"effectivePeriod": {
"start": "2012-12-05",
"end": "2012-10-25"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:33:52.257 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:33:52.878 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:33:55.372+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:33:55.372+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:33:52.879 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX08",
"display": "Pentostatina"
}
]
},
"effectivePeriod": {
"start": "2013-03-05",
"end": "2013-05-24"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:33:53.524 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:33:53.524 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YZVgBzx5TDpIcX6Z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19683/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:33:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19683/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:33:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:33:53.524 [print] {
"resourceType": "MedicationAdministration",
"id": "19683",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:33:56.640+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX08",
"display": "Pentostatina"
}
]
},
"effectivePeriod": {
"start": "2013-03-05",
"end": "2013-05-24"
}
}
> *
print COOKIES
10:33:53.524 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:33:53.525 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:33:53.525 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YZVgBzx5TDpIcX6Z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19683/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:33:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19683/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:33:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:33:53.525 [print] {
"resourceType": "MedicationAdministration",
"id": "19683",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:33:56.640+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX08",
"display": "Pentostatina"
}
]
},
"effectivePeriod": {
"start": "2013-03-05",
"end": "2013-05-24"
}
}
> *
print COOKIES
10:33:53.525 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:33:54.122 [print] {
"resourceType": "MedicationAdministration",
"id": "19683",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:33:56.640+02:00",
"source": "#YZVgBzx5TDpIcX6Z",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX08",
"display": "Pentostatina"
}
]
},
"effectivePeriod": {
"start": "2013-03-05",
"end": "2013-05-24"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:33:54.747 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:33:55.366 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:33:57.874+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:33:57.874+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:33:55.367 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA02",
"display": "Filgrastim"
}
]
},
"effectivePeriod": {
"start": "2013-04-29",
"end": "2013-07-15"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:33:55.997 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:33:55.997 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6IH9PzP0HXyo7vqR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19684/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:33:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19684/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:33:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:33:55.997 [print] {
"resourceType": "MedicationAdministration",
"id": "19684",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:33:59.103+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA02",
"display": "Filgrastim"
}
]
},
"effectivePeriod": {
"start": "2013-04-29",
"end": "2013-07-15"
}
}
> *
print COOKIES
10:33:55.997 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:33:55.998 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:33:55.999 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6IH9PzP0HXyo7vqR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19684/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:33:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19684/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:33:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:33:55.999 [print] {
"resourceType": "MedicationAdministration",
"id": "19684",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:33:59.103+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA02",
"display": "Filgrastim"
}
]
},
"effectivePeriod": {
"start": "2013-04-29",
"end": "2013-07-15"
}
}
> *
print COOKIES
10:33:55.999 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:33:56.616 [print] {
"resourceType": "MedicationAdministration",
"id": "19684",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:33:59.103+02:00",
"source": "#6IH9PzP0HXyo7vqR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA02",
"display": "Filgrastim"
}
]
},
"effectivePeriod": {
"start": "2013-04-29",
"end": "2013-07-15"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:33:57.261 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:33:57.923 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:00.369+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:00.369+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:33:57.925 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX25",
"display": "Bexarotene"
}
]
},
"effectivePeriod": {
"start": "2014-01-16",
"end": "2013-07-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:33:58.557 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:33:58.557 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FJfRsdgkcURUOgYN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19685/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19685/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:33:58.557 [print] {
"resourceType": "MedicationAdministration",
"id": "19685",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:01.685+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX25",
"display": "Bexarotene"
}
]
},
"effectivePeriod": {
"start": "2014-01-16",
"end": "2013-07-29"
}
}
> *
print COOKIES
10:33:58.557 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:33:58.559 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:33:58.559 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FJfRsdgkcURUOgYN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19685/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19685/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:33:58.559 [print] {
"resourceType": "MedicationAdministration",
"id": "19685",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:01.685+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX25",
"display": "Bexarotene"
}
]
},
"effectivePeriod": {
"start": "2014-01-16",
"end": "2013-07-29"
}
}
> *
print COOKIES
10:33:58.559 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:33:59.236 [print] {
"resourceType": "MedicationAdministration",
"id": "19685",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:01.685+02:00",
"source": "#FJfRsdgkcURUOgYN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX25",
"display": "Bexarotene"
}
]
},
"effectivePeriod": {
"start": "2014-01-16",
"end": "2013-07-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:33:59.865 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:00.470 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:02.984+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:02.984+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:00.472 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE09",
"display": "Temsirolimus"
}
]
},
"effectivePeriod": {
"start": "2014-01-24",
"end": "2013-10-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:01.327 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:01.327 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mfjU1XTmDrFguejw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19686/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19686/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:01.327 [print] {
"resourceType": "MedicationAdministration",
"id": "19686",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:04.443+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE09",
"display": "Temsirolimus"
}
]
},
"effectivePeriod": {
"start": "2014-01-24",
"end": "2013-10-16"
}
}
> *
print COOKIES
10:34:01.327 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:01.329 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:01.329 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mfjU1XTmDrFguejw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19686/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19686/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:01.329 [print] {
"resourceType": "MedicationAdministration",
"id": "19686",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:04.443+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE09",
"display": "Temsirolimus"
}
]
},
"effectivePeriod": {
"start": "2014-01-24",
"end": "2013-10-16"
}
}
> *
print COOKIES
10:34:01.329 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:01.977 [print] {
"resourceType": "MedicationAdministration",
"id": "19686",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:04.443+02:00",
"source": "#mfjU1XTmDrFguejw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE09",
"display": "Temsirolimus"
}
]
},
"effectivePeriod": {
"start": "2014-01-24",
"end": "2013-10-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:34:02.874 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:03.517 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:05.994+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:05.994+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:03.519 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC08",
"display": "Panitumumab"
}
]
},
"effectivePeriod": {
"start": "2014-01-28",
"end": "2014-03-07"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:04.206 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:04.206 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xT1FKPoNgFSGafQ5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19687/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19687/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:04.206 [print] {
"resourceType": "MedicationAdministration",
"id": "19687",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:07.320+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC08",
"display": "Panitumumab"
}
]
},
"effectivePeriod": {
"start": "2014-01-28",
"end": "2014-03-07"
}
}
> *
print COOKIES
10:34:04.206 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:04.208 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:04.208 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xT1FKPoNgFSGafQ5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19687/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19687/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:04.209 [print] {
"resourceType": "MedicationAdministration",
"id": "19687",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:07.320+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC08",
"display": "Panitumumab"
}
]
},
"effectivePeriod": {
"start": "2014-01-28",
"end": "2014-03-07"
}
}
> *
print COOKIES
10:34:04.209 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:04.831 [print] {
"resourceType": "MedicationAdministration",
"id": "19687",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:07.320+02:00",
"source": "#xT1FKPoNgFSGafQ5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC08",
"display": "Panitumumab"
}
]
},
"effectivePeriod": {
"start": "2014-01-28",
"end": "2014-03-07"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:34:05.466 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:06.096 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:08.592+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:08.592+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:06.097 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX05",
"display": "Pidotimod"
}
]
},
"effectivePeriod": {
"start": "2014-04-21",
"end": "2014-05-13"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:06.723 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:06.723 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XyP1ukLqHOp6kLXU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19688/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19688/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:06.723 [print] {
"resourceType": "MedicationAdministration",
"id": "19688",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:09.843+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX05",
"display": "Pidotimod"
}
]
},
"effectivePeriod": {
"start": "2014-04-21",
"end": "2014-05-13"
}
}
> *
print COOKIES
10:34:06.723 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:06.724 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:06.724 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XyP1ukLqHOp6kLXU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19688/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19688/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:06.725 [print] {
"resourceType": "MedicationAdministration",
"id": "19688",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:09.843+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX05",
"display": "Pidotimod"
}
]
},
"effectivePeriod": {
"start": "2014-04-21",
"end": "2014-05-13"
}
}
> *
print COOKIES
10:34:06.725 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:07.404 [print] {
"resourceType": "MedicationAdministration",
"id": "19688",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:09.843+02:00",
"source": "#XyP1ukLqHOp6kLXU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX05",
"display": "Pidotimod"
}
]
},
"effectivePeriod": {
"start": "2014-04-21",
"end": "2014-05-13"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:34:08.034 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 12ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 12ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:08.922 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:11.147+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:11.147+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:08.924 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB04",
"display": "Enzalutamide"
}
]
},
"effectivePeriod": {
"start": "2014-06-05",
"end": "2014-05-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:09.557 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:09.557 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7WdFQolX4YqqCIji"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19689/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19689/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:09.557 [print] {
"resourceType": "MedicationAdministration",
"id": "19689",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:12.671+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB04",
"display": "Enzalutamide"
}
]
},
"effectivePeriod": {
"start": "2014-06-05",
"end": "2014-05-30"
}
}
> *
print COOKIES
10:34:09.557 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:09.559 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:09.559 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7WdFQolX4YqqCIji"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19689/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19689/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:09.559 [print] {
"resourceType": "MedicationAdministration",
"id": "19689",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:12.671+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB04",
"display": "Enzalutamide"
}
]
},
"effectivePeriod": {
"start": "2014-06-05",
"end": "2014-05-30"
}
}
> *
print COOKIES
10:34:09.559 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:10.193 [print] {
"resourceType": "MedicationAdministration",
"id": "19689",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:12.671+02:00",
"source": "#7WdFQolX4YqqCIji",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB04",
"display": "Enzalutamide"
}
]
},
"effectivePeriod": {
"start": "2014-06-05",
"end": "2014-05-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:34:10.840 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:11.452 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:13.961+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:13.961+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:11.455 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX05",
"display": "Hydroxycarbamide"
}
]
},
"effectivePeriod": {
"start": "2014-07-22",
"end": "2014-09-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:12.070 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"645"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:12.070 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LgFvXo0yjei5JIyA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19690/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19690/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:12.070 [print] {
"resourceType": "MedicationAdministration",
"id": "19690",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:15.187+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX05",
"display": "Hydroxycarbamide"
}
]
},
"effectivePeriod": {
"start": "2014-07-22",
"end": "2014-09-30"
}
}
> *
print COOKIES
10:34:12.070 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:12.071 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"645"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:12.071 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LgFvXo0yjei5JIyA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19690/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19690/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:12.071 [print] {
"resourceType": "MedicationAdministration",
"id": "19690",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:15.187+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX05",
"display": "Hydroxycarbamide"
}
]
},
"effectivePeriod": {
"start": "2014-07-22",
"end": "2014-09-30"
}
}
> *
print COOKIES
10:34:12.071 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:12.698 [print] {
"resourceType": "MedicationAdministration",
"id": "19690",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:15.187+02:00",
"source": "#LgFvXo0yjei5JIyA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX05",
"display": "Hydroxycarbamide"
}
]
},
"effectivePeriod": {
"start": "2014-07-22",
"end": "2014-09-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:34:13.367 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:13.972 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:16.494+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:16.494+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:13.973 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX13",
"display": "Glatiramer "
}
]
},
"effectivePeriod": {
"start": "2014-08-01",
"end": "2014-10-08"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:14.633 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:14.633 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kVNFoX39Vi4z3L3u"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19691/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19691/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:14.633 [print] {
"resourceType": "MedicationAdministration",
"id": "19691",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:17.747+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX13",
"display": "Glatiramer "
}
]
},
"effectivePeriod": {
"start": "2014-08-01",
"end": "2014-10-08"
}
}
> *
print COOKIES
10:34:14.633 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:14.635 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:14.635 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kVNFoX39Vi4z3L3u"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19691/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19691/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:14.635 [print] {
"resourceType": "MedicationAdministration",
"id": "19691",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:17.747+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX13",
"display": "Glatiramer "
}
]
},
"effectivePeriod": {
"start": "2014-08-01",
"end": "2014-10-08"
}
}
> *
print COOKIES
10:34:14.635 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:15.302 [print] {
"resourceType": "MedicationAdministration",
"id": "19691",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:17.747+02:00",
"source": "#kVNFoX39Vi4z3L3u",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX13",
"display": "Glatiramer "
}
]
},
"effectivePeriod": {
"start": "2014-08-01",
"end": "2014-10-08"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:34:15.918 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:16.920 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:19.044+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:19.044+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:16.922 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timomudulina"
}
]
},
"effectivePeriod": {
"start": "2014-08-26",
"end": "2014-10-21"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:17.777 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:17.777 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rVwNjYv2sgxpBBNF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19692/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19692/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:17.777 [print] {
"resourceType": "MedicationAdministration",
"id": "19692",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:20.672+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timomudulina"
}
]
},
"effectivePeriod": {
"start": "2014-08-26",
"end": "2014-10-21"
}
}
> *
print COOKIES
10:34:17.777 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:17.778 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:17.778 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rVwNjYv2sgxpBBNF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19692/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19692/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:17.778 [print] {
"resourceType": "MedicationAdministration",
"id": "19692",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:20.672+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timomudulina"
}
]
},
"effectivePeriod": {
"start": "2014-08-26",
"end": "2014-10-21"
}
}
> *
print COOKIES
10:34:17.778 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:18.394 [print] {
"resourceType": "MedicationAdministration",
"id": "19692",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:20.672+02:00",
"source": "#rVwNjYv2sgxpBBNF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timomudulina"
}
]
},
"effectivePeriod": {
"start": "2014-08-26",
"end": "2014-10-21"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:34:19.019 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:19.660 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:22.149+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:22.149+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:19.662 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE21",
"display": "Regorafenib"
}
]
},
"effectivePeriod": {
"start": "2014-09-04",
"end": "2014-11-06"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:20.305 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:20.305 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"28ImvMx2Wq2ljRKX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19693/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19693/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:20.305 [print] {
"resourceType": "MedicationAdministration",
"id": "19693",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:23.420+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE21",
"display": "Regorafenib"
}
]
},
"effectivePeriod": {
"start": "2014-09-04",
"end": "2014-11-06"
}
}
> *
print COOKIES
10:34:20.305 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:20.306 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:20.306 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"28ImvMx2Wq2ljRKX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19693/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19693/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:20.306 [print] {
"resourceType": "MedicationAdministration",
"id": "19693",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:23.420+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE21",
"display": "Regorafenib"
}
]
},
"effectivePeriod": {
"start": "2014-09-04",
"end": "2014-11-06"
}
}
> *
print COOKIES
10:34:20.306 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:20.909 [print] {
"resourceType": "MedicationAdministration",
"id": "19693",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:23.420+02:00",
"source": "#28ImvMx2Wq2ljRKX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE21",
"display": "Regorafenib"
}
]
},
"effectivePeriod": {
"start": "2014-09-04",
"end": "2014-11-06"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:34:21.542 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:22.238 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:24.636+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:24.636+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:22.239 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD06",
"display": "Efaproxiral"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2015-04-09"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:22.850 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:22.850 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lZenBbTz7iqHc5Mq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19694/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19694/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:22.850 [print] {
"resourceType": "MedicationAdministration",
"id": "19694",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:25.977+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD06",
"display": "Efaproxiral"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2015-04-09"
}
}
> *
print COOKIES
10:34:22.850 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:22.851 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:22.851 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lZenBbTz7iqHc5Mq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19694/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19694/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:22.852 [print] {
"resourceType": "MedicationAdministration",
"id": "19694",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:25.977+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD06",
"display": "Efaproxiral"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2015-04-09"
}
}
> *
print COOKIES
10:34:22.852 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:23.468 [print] {
"resourceType": "MedicationAdministration",
"id": "19694",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:25.977+02:00",
"source": "#lZenBbTz7iqHc5Mq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD06",
"display": "Efaproxiral"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2015-04-09"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:34:24.082 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:24.717 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:27.205+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:27.205+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:24.718 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX03",
"display": "Temozolomide"
}
]
},
"effectivePeriod": {
"start": "2015-02-04",
"end": "2015-06-22"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:25.342 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:25.343 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2LXT8zeYx8hYkdXG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19695/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19695/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:25.343 [print] {
"resourceType": "MedicationAdministration",
"id": "19695",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:28.471+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX03",
"display": "Temozolomide"
}
]
},
"effectivePeriod": {
"start": "2015-02-04",
"end": "2015-06-22"
}
}
> *
print COOKIES
10:34:25.343 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:25.344 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:25.344 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2LXT8zeYx8hYkdXG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19695/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19695/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:25.344 [print] {
"resourceType": "MedicationAdministration",
"id": "19695",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:28.471+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX03",
"display": "Temozolomide"
}
]
},
"effectivePeriod": {
"start": "2015-02-04",
"end": "2015-06-22"
}
}
> *
print COOKIES
10:34:25.344 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:25.964 [print] {
"resourceType": "MedicationAdministration",
"id": "19695",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:28.471+02:00",
"source": "#2LXT8zeYx8hYkdXG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX03",
"display": "Temozolomide"
}
]
},
"effectivePeriod": {
"start": "2015-02-04",
"end": "2015-06-22"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:34:26.617 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:27.265 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:29.735+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:29.735+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:27.267 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX22",
"display": "Alitretinoina"
}
]
},
"effectivePeriod": {
"start": "2015-05-12",
"end": "2015-10-05"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:27.884 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:27.884 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1JjLP8dnheSSRj4V"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19696/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19696/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:27.884 [print] {
"resourceType": "MedicationAdministration",
"id": "19696",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:31.007+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX22",
"display": "Alitretinoina"
}
]
},
"effectivePeriod": {
"start": "2015-05-12",
"end": "2015-10-05"
}
}
> *
print COOKIES
10:34:27.884 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:27.886 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:27.886 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1JjLP8dnheSSRj4V"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19696/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19696/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:27.886 [print] {
"resourceType": "MedicationAdministration",
"id": "19696",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:31.007+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX22",
"display": "Alitretinoina"
}
]
},
"effectivePeriod": {
"start": "2015-05-12",
"end": "2015-10-05"
}
}
> *
print COOKIES
10:34:27.886 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:28.501 [print] {
"resourceType": "MedicationAdministration",
"id": "19696",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:31.007+02:00",
"source": "#1JjLP8dnheSSRj4V",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX22",
"display": "Alitretinoina"
}
]
},
"effectivePeriod": {
"start": "2015-05-12",
"end": "2015-10-05"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:34:29.117 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:29.736 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:32.248+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:32.248+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:29.737 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE18",
"display": "Ruxolitinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-29",
"end": "2015-10-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:30.349 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:30.349 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t99SZxCwilvNzWyz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19697/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19697/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:30.349 [print] {
"resourceType": "MedicationAdministration",
"id": "19697",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:33.471+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE18",
"display": "Ruxolitinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-29",
"end": "2015-10-29"
}
}
> *
print COOKIES
10:34:30.349 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:30.350 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:30.350 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t99SZxCwilvNzWyz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19697/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19697/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:30.350 [print] {
"resourceType": "MedicationAdministration",
"id": "19697",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:33.471+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE18",
"display": "Ruxolitinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-29",
"end": "2015-10-29"
}
}
> *
print COOKIES
10:34:30.350 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:30.969 [print] {
"resourceType": "MedicationAdministration",
"id": "19697",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:33.471+02:00",
"source": "#t99SZxCwilvNzWyz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE18",
"display": "Ruxolitinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-29",
"end": "2015-10-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:34:31.631 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:32.255 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:34.753+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:34.753+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:32.257 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA31",
"display": "Teriflunomide"
}
]
},
"effectivePeriod": {
"start": "2015-10-16",
"end": "2015-10-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:32.889 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:32.889 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NDDWpy2aDAKs9y8e"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19698/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19698/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:32.889 [print] {
"resourceType": "MedicationAdministration",
"id": "19698",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:36.014+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA31",
"display": "Teriflunomide"
}
]
},
"effectivePeriod": {
"start": "2015-10-16",
"end": "2015-10-30"
}
}
> *
print COOKIES
10:34:32.889 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:32.890 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:32.890 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NDDWpy2aDAKs9y8e"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19698/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19698/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:32.890 [print] {
"resourceType": "MedicationAdministration",
"id": "19698",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:36.014+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA31",
"display": "Teriflunomide"
}
]
},
"effectivePeriod": {
"start": "2015-10-16",
"end": "2015-10-30"
}
}
> *
print COOKIES
10:34:32.890 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:33.532 [print] {
"resourceType": "MedicationAdministration",
"id": "19698",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:36.014+02:00",
"source": "#NDDWpy2aDAKs9y8e",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA31",
"display": "Teriflunomide"
}
]
},
"effectivePeriod": {
"start": "2015-10-16",
"end": "2015-10-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:34:34.155 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:35.055 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:37.286+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:37.286+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:35.056 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG06",
"display": "Exemestano"
}
]
},
"effectivePeriod": {
"start": "2015-12-30",
"end": "2016-02-12"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:35.691 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:35.691 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"A5kP5gePv5Ir4uMQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19699/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19699/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:35.691 [print] {
"resourceType": "MedicationAdministration",
"id": "19699",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:38.799+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG06",
"display": "Exemestano"
}
]
},
"effectivePeriod": {
"start": "2015-12-30",
"end": "2016-02-12"
}
}
> *
print COOKIES
10:34:35.691 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:35.692 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:35.692 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"A5kP5gePv5Ir4uMQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19699/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19699/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:35.692 [print] {
"resourceType": "MedicationAdministration",
"id": "19699",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:38.799+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG06",
"display": "Exemestano"
}
]
},
"effectivePeriod": {
"start": "2015-12-30",
"end": "2016-02-12"
}
}
> *
print COOKIES
10:34:35.692 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:36.566 [print] {
"resourceType": "MedicationAdministration",
"id": "19699",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:38.799+02:00",
"source": "#A5kP5gePv5Ir4uMQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG06",
"display": "Exemestano"
}
]
},
"effectivePeriod": {
"start": "2015-12-30",
"end": "2016-02-12"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:34:37.186 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:37.798 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:40.315+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:40.315+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:37.800 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD03",
"display": "Metil 5-aminolevulinato"
}
]
},
"effectivePeriod": {
"start": "2016-02-16",
"end": "2016-06-01"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:38.436 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"652"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:38.436 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SkYcYoGtrSLmnqB2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19700/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19700/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:38.436 [print] {
"resourceType": "MedicationAdministration",
"id": "19700",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:41.557+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD03",
"display": "Metil 5-aminolevulinato"
}
]
},
"effectivePeriod": {
"start": "2016-02-16",
"end": "2016-06-01"
}
}
> *
print COOKIES
10:34:38.436 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:38.438 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"652"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:38.438 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SkYcYoGtrSLmnqB2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19700/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19700/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:38.438 [print] {
"resourceType": "MedicationAdministration",
"id": "19700",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:41.557+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD03",
"display": "Metil 5-aminolevulinato"
}
]
},
"effectivePeriod": {
"start": "2016-02-16",
"end": "2016-06-01"
}
}
> *
print COOKIES
10:34:38.438 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:39.054 [print] {
"resourceType": "MedicationAdministration",
"id": "19700",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:41.557+02:00",
"source": "#SkYcYoGtrSLmnqB2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD03",
"display": "Metil 5-aminolevulinato"
}
]
},
"effectivePeriod": {
"start": "2016-02-16",
"end": "2016-06-01"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:34:39.673 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:40.305 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:42.796+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:42.796+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:40.307 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE08",
"display": "Nilotinib "
}
]
},
"effectivePeriod": {
"start": "2016-12-27",
"end": "2016-06-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:41.137 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:41.137 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QKHuq3HJS2yr2uiV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19701/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19701/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:41.139 [print] {
"resourceType": "MedicationAdministration",
"id": "19701",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:44.258+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE08",
"display": "Nilotinib "
}
]
},
"effectivePeriod": {
"start": "2016-12-27",
"end": "2016-06-17"
}
}
> *
print COOKIES
10:34:41.139 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:41.140 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:41.140 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QKHuq3HJS2yr2uiV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19701/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19701/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:41.140 [print] {
"resourceType": "MedicationAdministration",
"id": "19701",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:44.258+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE08",
"display": "Nilotinib "
}
]
},
"effectivePeriod": {
"start": "2016-12-27",
"end": "2016-06-17"
}
}
> *
print COOKIES
10:34:41.140 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:41.749 [print] {
"resourceType": "MedicationAdministration",
"id": "19701",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:44.258+02:00",
"source": "#QKHuq3HJS2yr2uiV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE08",
"display": "Nilotinib "
}
]
},
"effectivePeriod": {
"start": "2016-12-27",
"end": "2016-06-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:34:42.412 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:43.041 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:45.538+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:45.538+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:43.043 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA02",
"display": "Vincristina"
}
]
},
"effectivePeriod": {
"start": "2017-02-24",
"end": "2016-09-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:43.651 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:43.651 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jJITAt7faDRBKy8J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19702/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19702/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:43.651 [print] {
"resourceType": "MedicationAdministration",
"id": "19702",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:46.765+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA02",
"display": "Vincristina"
}
]
},
"effectivePeriod": {
"start": "2017-02-24",
"end": "2016-09-30"
}
}
> *
print COOKIES
10:34:43.651 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:43.653 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:43.653 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jJITAt7faDRBKy8J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19702/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19702/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:43.653 [print] {
"resourceType": "MedicationAdministration",
"id": "19702",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:46.765+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA02",
"display": "Vincristina"
}
]
},
"effectivePeriod": {
"start": "2017-02-24",
"end": "2016-09-30"
}
}
> *
print COOKIES
10:34:43.653 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:44.263 [print] {
"resourceType": "MedicationAdministration",
"id": "19702",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:46.765+02:00",
"source": "#jJITAt7faDRBKy8J",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA02",
"display": "Vincristina"
}
]
},
"effectivePeriod": {
"start": "2017-02-24",
"end": "2016-09-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:34:44.907 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:45.512 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:48.032+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:48.032+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:45.513 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX04",
"display": "Dacarbazina"
}
]
},
"effectivePeriod": {
"start": "2017-06-05",
"end": "2017-05-08"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:46.130 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:46.130 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zboYH4ZiBvfiyx4D"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19703/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19703/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:46.130 [print] {
"resourceType": "MedicationAdministration",
"id": "19703",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:49.248+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX04",
"display": "Dacarbazina"
}
]
},
"effectivePeriod": {
"start": "2017-06-05",
"end": "2017-05-08"
}
}
> *
print COOKIES
10:34:46.130 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:46.130 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:46.130 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zboYH4ZiBvfiyx4D"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19703/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19703/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:46.130 [print] {
"resourceType": "MedicationAdministration",
"id": "19703",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:49.248+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX04",
"display": "Dacarbazina"
}
]
},
"effectivePeriod": {
"start": "2017-06-05",
"end": "2017-05-08"
}
}
> *
print COOKIES
10:34:46.130 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:46.844 [print] {
"resourceType": "MedicationAdministration",
"id": "19703",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:49.248+02:00",
"source": "#zboYH4ZiBvfiyx4D",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX04",
"display": "Dacarbazina"
}
]
},
"effectivePeriod": {
"start": "2017-06-05",
"end": "2017-05-08"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:34:47.501 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:48.120 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:50.630+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:50.630+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:48.122 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC01",
"display": "Edrecolomab"
}
]
},
"effectivePeriod": {
"start": "2017-07-13",
"end": "2017-05-22"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:48.740 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:48.740 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8J8WpYaDKyjEV82o"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19704/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19704/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:48.741 [print] {
"resourceType": "MedicationAdministration",
"id": "19704",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:51.863+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC01",
"display": "Edrecolomab"
}
]
},
"effectivePeriod": {
"start": "2017-07-13",
"end": "2017-05-22"
}
}
> *
print COOKIES
10:34:48.741 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:48.742 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:48.742 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8J8WpYaDKyjEV82o"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19704/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19704/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:48.742 [print] {
"resourceType": "MedicationAdministration",
"id": "19704",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:51.863+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC01",
"display": "Edrecolomab"
}
]
},
"effectivePeriod": {
"start": "2017-07-13",
"end": "2017-05-22"
}
}
> *
print COOKIES
10:34:48.742 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:49.350 [print] {
"resourceType": "MedicationAdministration",
"id": "19704",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:51.863+02:00",
"source": "#8J8WpYaDKyjEV82o",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC01",
"display": "Edrecolomab"
}
]
},
"effectivePeriod": {
"start": "2017-07-13",
"end": "2017-05-22"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:34:49.972 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:50.602 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:53.103+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:53.103+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:50.603 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA14",
"display": "Lipegfilgrastim"
}
]
},
"effectivePeriod": {
"start": "2017-08-11",
"end": "2017-11-03"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:51.237 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"644"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:51.237 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"D7axj7bDgXfk3IgN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19705/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19705/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:51.237 [print] {
"resourceType": "MedicationAdministration",
"id": "19705",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:54.364+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA14",
"display": "Lipegfilgrastim"
}
]
},
"effectivePeriod": {
"start": "2017-08-11",
"end": "2017-11-03"
}
}
> *
print COOKIES
10:34:51.237 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:51.239 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"644"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:51.239 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"D7axj7bDgXfk3IgN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19705/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19705/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:51.239 [print] {
"resourceType": "MedicationAdministration",
"id": "19705",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:54.364+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA14",
"display": "Lipegfilgrastim"
}
]
},
"effectivePeriod": {
"start": "2017-08-11",
"end": "2017-11-03"
}
}
> *
print COOKIES
10:34:51.239 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:51.843 [print] {
"resourceType": "MedicationAdministration",
"id": "19705",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:54.364+02:00",
"source": "#D7axj7bDgXfk3IgN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA14",
"display": "Lipegfilgrastim"
}
]
},
"effectivePeriod": {
"start": "2017-08-11",
"end": "2017-11-03"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:34:52.559 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:53.190 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:55.670+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:55.670+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:53.191 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD02",
"display": "Lomustina"
}
]
},
"effectivePeriod": {
"start": "2017-12-06",
"end": "2017-11-13"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:53.831 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:53.831 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"S2PjnzJDqQjNjqJp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19706/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19706/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:53.831 [print] {
"resourceType": "MedicationAdministration",
"id": "19706",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:56.948+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD02",
"display": "Lomustina"
}
]
},
"effectivePeriod": {
"start": "2017-12-06",
"end": "2017-11-13"
}
}
> *
print COOKIES
10:34:53.831 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:53.833 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:53.833 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"S2PjnzJDqQjNjqJp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19706/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19706/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:53.833 [print] {
"resourceType": "MedicationAdministration",
"id": "19706",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:56.948+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD02",
"display": "Lomustina"
}
]
},
"effectivePeriod": {
"start": "2017-12-06",
"end": "2017-11-13"
}
}
> *
print COOKIES
10:34:53.833 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:54.459 [print] {
"resourceType": "MedicationAdministration",
"id": "19706",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:56.948+02:00",
"source": "#S2PjnzJDqQjNjqJp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD02",
"display": "Lomustina"
}
]
},
"effectivePeriod": {
"start": "2017-12-06",
"end": "2017-11-13"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:34:55.072 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:55.693 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:34:58.201+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:34:58.201+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:55.695 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD01",
"display": "Ciclosporina"
}
]
},
"effectivePeriod": {
"start": "2012-12-11",
"end": "2012-10-31"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:56.329 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:56.329 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t1jGwetyPtuSWftB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19707/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19707/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:56.329 [print] {
"resourceType": "MedicationAdministration",
"id": "19707",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:59.441+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD01",
"display": "Ciclosporina"
}
]
},
"effectivePeriod": {
"start": "2012-12-11",
"end": "2012-10-31"
}
}
> *
print COOKIES
10:34:56.329 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:56.330 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:56.330 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t1jGwetyPtuSWftB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19707/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:34:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19707/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:34:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:56.330 [print] {
"resourceType": "MedicationAdministration",
"id": "19707",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:59.441+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD01",
"display": "Ciclosporina"
}
]
},
"effectivePeriod": {
"start": "2012-12-11",
"end": "2012-10-31"
}
}
> *
print COOKIES
10:34:56.330 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:56.957 [print] {
"resourceType": "MedicationAdministration",
"id": "19707",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:34:59.441+02:00",
"source": "#t1jGwetyPtuSWftB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD01",
"display": "Ciclosporina"
}
]
},
"effectivePeriod": {
"start": "2012-12-11",
"end": "2012-10-31"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:34:57.593 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:34:58.236 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:00.713+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:00.713+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:34:58.238 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC01",
"display": "Daclizumab"
}
]
},
"effectivePeriod": {
"start": "2013-03-11",
"end": "2013-01-07"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:58.881 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:58.881 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"K2mKm211UvzaRIS8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19708/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19708/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:58.881 [print] {
"resourceType": "MedicationAdministration",
"id": "19708",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:02.000+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC01",
"display": "Daclizumab"
}
]
},
"effectivePeriod": {
"start": "2013-03-11",
"end": "2013-01-07"
}
}
> *
print COOKIES
10:34:58.881 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:34:58.882 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:34:58.882 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"K2mKm211UvzaRIS8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19708/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19708/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:34:58.882 [print] {
"resourceType": "MedicationAdministration",
"id": "19708",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:02.000+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC01",
"display": "Daclizumab"
}
]
},
"effectivePeriod": {
"start": "2013-03-11",
"end": "2013-01-07"
}
}
> *
print COOKIES
10:34:58.882 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:34:59.491 [print] {
"resourceType": "MedicationAdministration",
"id": "19708",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:02.000+02:00",
"source": "#K2mKm211UvzaRIS8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC01",
"display": "Daclizumab"
}
]
},
"effectivePeriod": {
"start": "2013-03-11",
"end": "2013-01-07"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:00.124 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:00.720 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:03.251+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:03.251+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:00.722 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB02",
"display": "Infliximab"
}
]
},
"effectivePeriod": {
"start": "2013-12-31",
"end": "2013-01-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:01.340 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:01.340 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tdJr5WldnpErJSW1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19709/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19709/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:01.340 [print] {
"resourceType": "MedicationAdministration",
"id": "19709",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:04.452+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB02",
"display": "Infliximab"
}
]
},
"effectivePeriod": {
"start": "2013-12-31",
"end": "2013-01-29"
}
}
> *
print COOKIES
10:35:01.340 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:01.341 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:01.341 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tdJr5WldnpErJSW1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19709/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19709/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:01.341 [print] {
"resourceType": "MedicationAdministration",
"id": "19709",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:04.452+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB02",
"display": "Infliximab"
}
]
},
"effectivePeriod": {
"start": "2013-12-31",
"end": "2013-01-29"
}
}
> *
print COOKIES
10:35:01.341 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:01.964 [print] {
"resourceType": "MedicationAdministration",
"id": "19709",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:04.452+02:00",
"source": "#tdJr5WldnpErJSW1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB02",
"display": "Infliximab"
}
]
},
"effectivePeriod": {
"start": "2013-12-31",
"end": "2013-01-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:02.601 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:03.431 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:05.720+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:05.720+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:03.432 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB04",
"display": "Interferone alfa-2a"
}
]
},
"effectivePeriod": {
"start": "2014-01-22",
"end": "2013-08-19"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:04.249 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:04.249 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BwJJ25m9ScOe4lG6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19710/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19710/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:04.249 [print] {
"resourceType": "MedicationAdministration",
"id": "19710",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:07.376+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB04",
"display": "Interferone alfa-2a"
}
]
},
"effectivePeriod": {
"start": "2014-01-22",
"end": "2013-08-19"
}
}
> *
print COOKIES
10:35:04.249 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:04.251 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:04.251 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BwJJ25m9ScOe4lG6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19710/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19710/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:04.251 [print] {
"resourceType": "MedicationAdministration",
"id": "19710",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:07.376+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB04",
"display": "Interferone alfa-2a"
}
]
},
"effectivePeriod": {
"start": "2014-01-22",
"end": "2013-08-19"
}
}
> *
print COOKIES
10:35:04.251 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:04.874 [print] {
"resourceType": "MedicationAdministration",
"id": "19710",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:07.376+02:00",
"source": "#BwJJ25m9ScOe4lG6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB04",
"display": "Interferone alfa-2a"
}
]
},
"effectivePeriod": {
"start": "2014-01-22",
"end": "2013-08-19"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:05.519 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:06.144 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:08.646+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:08.646+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:06.146 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA12",
"display": "Ancestim"
}
]
},
"effectivePeriod": {
"start": "2014-07-07",
"end": "2013-08-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:06.777 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:06.777 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RS8A2HExc2ihAkf7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19711/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19711/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:06.777 [print] {
"resourceType": "MedicationAdministration",
"id": "19711",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:09.888+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA12",
"display": "Ancestim"
}
]
},
"effectivePeriod": {
"start": "2014-07-07",
"end": "2013-08-28"
}
}
> *
print COOKIES
10:35:06.777 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:06.778 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:06.778 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RS8A2HExc2ihAkf7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19711/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19711/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:06.778 [print] {
"resourceType": "MedicationAdministration",
"id": "19711",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:09.888+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA12",
"display": "Ancestim"
}
]
},
"effectivePeriod": {
"start": "2014-07-07",
"end": "2013-08-28"
}
}
> *
print COOKIES
10:35:06.778 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:07.719 [print] {
"resourceType": "MedicationAdministration",
"id": "19711",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:09.888+02:00",
"source": "#RS8A2HExc2ihAkf7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA12",
"display": "Ancestim"
}
]
},
"effectivePeriod": {
"start": "2014-07-07",
"end": "2013-08-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:08.483 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:09.110 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:11.609+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:11.609+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:09.112 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA06",
"display": "Acido micofenolico sale di mofetile"
}
]
},
"effectivePeriod": {
"start": "2014-09-16",
"end": "2014-01-20"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:09.728 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"664"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:09.728 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bzRT3u1EV0j42bh7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19712/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19712/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:09.728 [print] {
"resourceType": "MedicationAdministration",
"id": "19712",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:12.856+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA06",
"display": "Acido micofenolico sale di mofetile"
}
]
},
"effectivePeriod": {
"start": "2014-09-16",
"end": "2014-01-20"
}
}
> *
print COOKIES
10:35:09.728 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:09.730 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"664"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:09.730 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bzRT3u1EV0j42bh7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19712/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19712/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:09.730 [print] {
"resourceType": "MedicationAdministration",
"id": "19712",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:12.856+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA06",
"display": "Acido micofenolico sale di mofetile"
}
]
},
"effectivePeriod": {
"start": "2014-09-16",
"end": "2014-01-20"
}
}
> *
print COOKIES
10:35:09.730 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:10.325 [print] {
"resourceType": "MedicationAdministration",
"id": "19712",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:12.856+02:00",
"source": "#bzRT3u1EV0j42bh7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA06",
"display": "Acido micofenolico sale di mofetile"
}
]
},
"effectivePeriod": {
"start": "2014-09-16",
"end": "2014-01-20"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:10.943 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:11.554 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:14.069+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:14.069+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:11.556 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA26",
"display": "Belimumab"
}
]
},
"effectivePeriod": {
"start": "2014-10-15",
"end": "2014-03-12"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:12.187 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:12.187 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LFgru9vh7O46kGW2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19713/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19713/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:12.187 [print] {
"resourceType": "MedicationAdministration",
"id": "19713",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:15.310+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA26",
"display": "Belimumab"
}
]
},
"effectivePeriod": {
"start": "2014-10-15",
"end": "2014-03-12"
}
}
> *
print COOKIES
10:35:12.187 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:12.190 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:12.190 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LFgru9vh7O46kGW2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19713/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19713/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:12.190 [print] {
"resourceType": "MedicationAdministration",
"id": "19713",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:15.310+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA26",
"display": "Belimumab"
}
]
},
"effectivePeriod": {
"start": "2014-10-15",
"end": "2014-03-12"
}
}
> *
print COOKIES
10:35:12.190 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:12.817 [print] {
"resourceType": "MedicationAdministration",
"id": "19713",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:15.310+02:00",
"source": "#LFgru9vh7O46kGW2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA26",
"display": "Belimumab"
}
]
},
"effectivePeriod": {
"start": "2014-10-15",
"end": "2014-03-12"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:13.461 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:14.065 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:16.592+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:16.592+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:14.067 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX01",
"display": "Mitobronitol"
}
]
},
"effectivePeriod": {
"start": "2014-12-01",
"end": "2014-05-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:14.671 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:14.671 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kRAWMPvWExRs8WsB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19714/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19714/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:14.671 [print] {
"resourceType": "MedicationAdministration",
"id": "19714",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:17.799+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX01",
"display": "Mitobronitol"
}
]
},
"effectivePeriod": {
"start": "2014-12-01",
"end": "2014-05-28"
}
}
> *
print COOKIES
10:35:14.671 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:14.673 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:14.673 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kRAWMPvWExRs8WsB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19714/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19714/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:14.674 [print] {
"resourceType": "MedicationAdministration",
"id": "19714",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:17.799+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX01",
"display": "Mitobronitol"
}
]
},
"effectivePeriod": {
"start": "2014-12-01",
"end": "2014-05-28"
}
}
> *
print COOKIES
10:35:14.674 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:15.297 [print] {
"resourceType": "MedicationAdministration",
"id": "19714",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:17.799+02:00",
"source": "#kRAWMPvWExRs8WsB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX01",
"display": "Mitobronitol"
}
]
},
"effectivePeriod": {
"start": "2014-12-01",
"end": "2014-05-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:15.957 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:16.559 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:19.078+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:19.078+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:16.560 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE38",
"display": "Cobimetinib"
}
]
},
"effectivePeriod": {
"start": "2015-05-08",
"end": "2014-07-18"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:17.205 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:17.205 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SdKoACjzK3N8W74X"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19715/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19715/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:17.205 [print] {
"resourceType": "MedicationAdministration",
"id": "19715",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:20.319+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE38",
"display": "Cobimetinib"
}
]
},
"effectivePeriod": {
"start": "2015-05-08",
"end": "2014-07-18"
}
}
> *
print COOKIES
10:35:17.205 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:17.207 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:17.207 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SdKoACjzK3N8W74X"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19715/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19715/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:17.207 [print] {
"resourceType": "MedicationAdministration",
"id": "19715",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:20.319+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE38",
"display": "Cobimetinib"
}
]
},
"effectivePeriod": {
"start": "2015-05-08",
"end": "2014-07-18"
}
}
> *
print COOKIES
10:35:17.207 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:17.815 [print] {
"resourceType": "MedicationAdministration",
"id": "19715",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:20.319+02:00",
"source": "#SdKoACjzK3N8W74X",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE38",
"display": "Cobimetinib"
}
]
},
"effectivePeriod": {
"start": "2015-05-08",
"end": "2014-07-18"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:18.452 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 12ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 12ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:19.082 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:21.568+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:21.568+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:19.084 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AG01",
"display": "Etoglucide"
}
]
},
"effectivePeriod": {
"start": "2015-07-22",
"end": "2014-09-02"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:20.016 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:20.016 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yTMWMOJ1bW7bxAtU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19716/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19716/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:20.016 [print] {
"resourceType": "MedicationAdministration",
"id": "19716",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:23.121+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AG01",
"display": "Etoglucide"
}
]
},
"effectivePeriod": {
"start": "2015-07-22",
"end": "2014-09-02"
}
}
> *
print COOKIES
10:35:20.016 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:20.018 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:20.018 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yTMWMOJ1bW7bxAtU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19716/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19716/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:20.018 [print] {
"resourceType": "MedicationAdministration",
"id": "19716",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:23.121+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AG01",
"display": "Etoglucide"
}
]
},
"effectivePeriod": {
"start": "2015-07-22",
"end": "2014-09-02"
}
}
> *
print COOKIES
10:35:20.018 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:20.615 [print] {
"resourceType": "MedicationAdministration",
"id": "19716",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:23.121+02:00",
"source": "#yTMWMOJ1bW7bxAtU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AG01",
"display": "Etoglucide"
}
]
},
"effectivePeriod": {
"start": "2015-07-22",
"end": "2014-09-02"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:21.259 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:21.920 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:24.384+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:24.384+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:21.922 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC59",
"display": "Trifluridina + tipiracil"
}
]
},
"effectivePeriod": {
"start": "2015-10-21",
"end": "2014-11-19"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:22.546 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"653"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:22.546 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eHOX1aY9VuZUn70q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19717/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19717/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:22.546 [print] {
"resourceType": "MedicationAdministration",
"id": "19717",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:25.664+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC59",
"display": "Trifluridina + tipiracil"
}
]
},
"effectivePeriod": {
"start": "2015-10-21",
"end": "2014-11-19"
}
}
> *
print COOKIES
10:35:22.546 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:22.547 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"653"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:22.547 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eHOX1aY9VuZUn70q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19717/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19717/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:22.547 [print] {
"resourceType": "MedicationAdministration",
"id": "19717",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:25.664+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC59",
"display": "Trifluridina + tipiracil"
}
]
},
"effectivePeriod": {
"start": "2015-10-21",
"end": "2014-11-19"
}
}
> *
print COOKIES
10:35:22.547 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:23.188 [print] {
"resourceType": "MedicationAdministration",
"id": "19717",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:25.664+02:00",
"source": "#eHOX1aY9VuZUn70q",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC59",
"display": "Trifluridina + tipiracil"
}
]
},
"effectivePeriod": {
"start": "2015-10-21",
"end": "2014-11-19"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:23.821 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:24.432 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:26.940+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:26.940+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:24.433 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BX02",
"display": "Degarelix"
}
]
},
"effectivePeriod": {
"start": "2015-10-22",
"end": "2014-11-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:25.069 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:25.069 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"POuiT5kSoB5jXxsS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19718/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19718/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:25.069 [print] {
"resourceType": "MedicationAdministration",
"id": "19718",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:28.174+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BX02",
"display": "Degarelix"
}
]
},
"effectivePeriod": {
"start": "2015-10-22",
"end": "2014-11-27"
}
}
> *
print COOKIES
10:35:25.069 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:25.070 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:25.070 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"POuiT5kSoB5jXxsS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19718/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19718/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:25.070 [print] {
"resourceType": "MedicationAdministration",
"id": "19718",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:28.174+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BX02",
"display": "Degarelix"
}
]
},
"effectivePeriod": {
"start": "2015-10-22",
"end": "2014-11-27"
}
}
> *
print COOKIES
10:35:25.070 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:25.669 [print] {
"resourceType": "MedicationAdministration",
"id": "19718",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:28.174+02:00",
"source": "#POuiT5kSoB5jXxsS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BX02",
"display": "Degarelix"
}
]
},
"effectivePeriod": {
"start": "2015-10-22",
"end": "2014-11-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:26.302 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:26.939 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:29.432+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:29.432+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:26.941 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB12",
"display": "Albinterferon alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2015-10-23",
"end": "2014-12-03"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:27.561 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"650"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:27.561 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yiIAfcAKeiej3P83"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19719/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19719/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:27.561 [print] {
"resourceType": "MedicationAdministration",
"id": "19719",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:30.672+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB12",
"display": "Albinterferon alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2015-10-23",
"end": "2014-12-03"
}
}
> *
print COOKIES
10:35:27.561 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:27.562 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"650"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:27.562 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yiIAfcAKeiej3P83"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19719/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19719/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:27.562 [print] {
"resourceType": "MedicationAdministration",
"id": "19719",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:30.672+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB12",
"display": "Albinterferon alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2015-10-23",
"end": "2014-12-03"
}
}
> *
print COOKIES
10:35:27.562 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:28.225 [print] {
"resourceType": "MedicationAdministration",
"id": "19719",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:30.672+02:00",
"source": "#yiIAfcAKeiej3P83",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB12",
"display": "Albinterferon alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2015-10-23",
"end": "2014-12-03"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:28.857 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:29.469 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:31.974+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:31.974+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:29.471 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE04",
"display": "Sunitinib "
}
]
},
"effectivePeriod": {
"start": "2015-11-17",
"end": "2015-01-08"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:30.116 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:30.116 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SGvhPDmnh1DQJfsy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19720/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19720/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:30.116 [print] {
"resourceType": "MedicationAdministration",
"id": "19720",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:33.224+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE04",
"display": "Sunitinib "
}
]
},
"effectivePeriod": {
"start": "2015-11-17",
"end": "2015-01-08"
}
}
> *
print COOKIES
10:35:30.116 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:30.117 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:30.117 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SGvhPDmnh1DQJfsy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19720/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19720/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:30.117 [print] {
"resourceType": "MedicationAdministration",
"id": "19720",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:33.224+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE04",
"display": "Sunitinib "
}
]
},
"effectivePeriod": {
"start": "2015-11-17",
"end": "2015-01-08"
}
}
> *
print COOKIES
10:35:30.117 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:31.012 [print] {
"resourceType": "MedicationAdministration",
"id": "19720",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:33.224+02:00",
"source": "#SGvhPDmnh1DQJfsy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE04",
"display": "Sunitinib "
}
]
},
"effectivePeriod": {
"start": "2015-11-17",
"end": "2015-01-08"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:31.671 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 16ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 16ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:32.317 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:34.797+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:34.797+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:32.319 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA04",
"display": "Pemetrexed "
}
]
},
"effectivePeriod": {
"start": "2016-01-18",
"end": "2015-03-19"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:33.078 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:33.078 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2U4jVIvbGCfJ3LWT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19721/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19721/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:33.078 [print] {
"resourceType": "MedicationAdministration",
"id": "19721",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:36.191+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA04",
"display": "Pemetrexed "
}
]
},
"effectivePeriod": {
"start": "2016-01-18",
"end": "2015-03-19"
}
}
> *
print COOKIES
10:35:33.078 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:33.080 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:33.080 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2U4jVIvbGCfJ3LWT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19721/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19721/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:33.080 [print] {
"resourceType": "MedicationAdministration",
"id": "19721",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:36.191+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA04",
"display": "Pemetrexed "
}
]
},
"effectivePeriod": {
"start": "2016-01-18",
"end": "2015-03-19"
}
}
> *
print COOKIES
10:35:33.080 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:33.708 [print] {
"resourceType": "MedicationAdministration",
"id": "19721",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:36.191+02:00",
"source": "#2U4jVIvbGCfJ3LWT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA04",
"display": "Pemetrexed "
}
]
},
"effectivePeriod": {
"start": "2016-01-18",
"end": "2015-03-19"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:34.330 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:34.929 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:37.459+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:37.459+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:34.930 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timostimulina"
}
]
},
"effectivePeriod": {
"start": "2016-01-26",
"end": "2015-08-07"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:35.554 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:35.554 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Mp8uB3DiZgy3G84V"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19722/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19722/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:35.554 [print] {
"resourceType": "MedicationAdministration",
"id": "19722",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:38.680+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timostimulina"
}
]
},
"effectivePeriod": {
"start": "2016-01-26",
"end": "2015-08-07"
}
}
> *
print COOKIES
10:35:35.554 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:35.556 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:35.556 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Mp8uB3DiZgy3G84V"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19722/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19722/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:35.556 [print] {
"resourceType": "MedicationAdministration",
"id": "19722",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:38.680+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timostimulina"
}
]
},
"effectivePeriod": {
"start": "2016-01-26",
"end": "2015-08-07"
}
}
> *
print COOKIES
10:35:35.556 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:36.144 [print] {
"resourceType": "MedicationAdministration",
"id": "19722",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:38.680+02:00",
"source": "#Mp8uB3DiZgy3G84V",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timostimulina"
}
]
},
"effectivePeriod": {
"start": "2016-01-26",
"end": "2015-08-07"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:36.812 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:37.454 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:39.942+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:39.942+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:37.456 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX03",
"display": "Metotrexato "
}
]
},
"effectivePeriod": {
"start": "2016-02-04",
"end": "2015-08-13"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:38.103 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:38.103 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"miiwzQFy7tkkwuaJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19723/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19723/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:38.103 [print] {
"resourceType": "MedicationAdministration",
"id": "19723",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:41.229+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX03",
"display": "Metotrexato "
}
]
},
"effectivePeriod": {
"start": "2016-02-04",
"end": "2015-08-13"
}
}
> *
print COOKIES
10:35:38.104 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:38.105 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:38.105 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"miiwzQFy7tkkwuaJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19723/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19723/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:38.105 [print] {
"resourceType": "MedicationAdministration",
"id": "19723",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:41.229+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX03",
"display": "Metotrexato "
}
]
},
"effectivePeriod": {
"start": "2016-02-04",
"end": "2015-08-13"
}
}
> *
print COOKIES
10:35:38.106 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:38.739 [print] {
"resourceType": "MedicationAdministration",
"id": "19723",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:41.229+02:00",
"source": "#miiwzQFy7tkkwuaJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX03",
"display": "Metotrexato "
}
]
},
"effectivePeriod": {
"start": "2016-02-04",
"end": "2015-08-13"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:39.352 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:39.973 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:42.481+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:42.481+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:39.975 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA09",
"display": "Bendamustina "
}
]
},
"effectivePeriod": {
"start": "2016-07-11",
"end": "2016-02-04"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:40.613 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:40.613 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UgKy4FHhlzY92YBC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19724/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19724/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:40.613 [print] {
"resourceType": "MedicationAdministration",
"id": "19724",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:43.743+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA09",
"display": "Bendamustina "
}
]
},
"effectivePeriod": {
"start": "2016-07-11",
"end": "2016-02-04"
}
}
> *
print COOKIES
10:35:40.613 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:40.614 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:40.614 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UgKy4FHhlzY92YBC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19724/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19724/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:40.615 [print] {
"resourceType": "MedicationAdministration",
"id": "19724",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:43.743+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA09",
"display": "Bendamustina "
}
]
},
"effectivePeriod": {
"start": "2016-07-11",
"end": "2016-02-04"
}
}
> *
print COOKIES
10:35:40.615 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:41.232 [print] {
"resourceType": "MedicationAdministration",
"id": "19724",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:43.743+02:00",
"source": "#UgKy4FHhlzY92YBC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA09",
"display": "Bendamustina "
}
]
},
"effectivePeriod": {
"start": "2016-07-11",
"end": "2016-02-04"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:41.864 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:42.478 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:44.991+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:44.991+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:42.480 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA01",
"display": "Vinblastina "
}
]
},
"effectivePeriod": {
"start": "2016-07-15",
"end": "2016-03-22"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:43.111 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:43.111 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JWR2bI79y2ZvH5ln"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19725/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19725/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:43.111 [print] {
"resourceType": "MedicationAdministration",
"id": "19725",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:46.222+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA01",
"display": "Vinblastina "
}
]
},
"effectivePeriod": {
"start": "2016-07-15",
"end": "2016-03-22"
}
}
> *
print COOKIES
10:35:43.111 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:43.112 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:43.113 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JWR2bI79y2ZvH5ln"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19725/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19725/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:43.113 [print] {
"resourceType": "MedicationAdministration",
"id": "19725",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:46.222+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA01",
"display": "Vinblastina "
}
]
},
"effectivePeriod": {
"start": "2016-07-15",
"end": "2016-03-22"
}
}
> *
print COOKIES
10:35:43.113 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:43.769 [print] {
"resourceType": "MedicationAdministration",
"id": "19725",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:46.222+02:00",
"source": "#JWR2bI79y2ZvH5ln",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA01",
"display": "Vinblastina "
}
]
},
"effectivePeriod": {
"start": "2016-07-15",
"end": "2016-03-22"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:44.401 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 17ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 17ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:45.009 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:47.514+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:47.514+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:45.011 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB03",
"display": "Bicalutamide"
}
]
},
"effectivePeriod": {
"start": "2016-10-21",
"end": "2016-05-25"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:45.634 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:45.634 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ukjqAvMlPbvgsLGI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19726/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19726/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:45.634 [print] {
"resourceType": "MedicationAdministration",
"id": "19726",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:48.762+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB03",
"display": "Bicalutamide"
}
]
},
"effectivePeriod": {
"start": "2016-10-21",
"end": "2016-05-25"
}
}
> *
print COOKIES
10:35:45.634 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:45.636 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:45.636 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ukjqAvMlPbvgsLGI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19726/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19726/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:45.636 [print] {
"resourceType": "MedicationAdministration",
"id": "19726",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:48.762+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB03",
"display": "Bicalutamide"
}
]
},
"effectivePeriod": {
"start": "2016-10-21",
"end": "2016-05-25"
}
}
> *
print COOKIES
10:35:45.636 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:46.281 [print] {
"resourceType": "MedicationAdministration",
"id": "19726",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:48.762+02:00",
"source": "#ukjqAvMlPbvgsLGI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB03",
"display": "Bicalutamide"
}
]
},
"effectivePeriod": {
"start": "2016-10-21",
"end": "2016-05-25"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:46.912 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:47.515 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:50.042+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:50.042+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:47.516 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timalfasina"
}
]
},
"effectivePeriod": {
"start": "2016-11-24",
"end": "2016-10-07"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:48.130 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:48.130 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FV3GuY6kxQxWWUFL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19727/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19727/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:48.130 [print] {
"resourceType": "MedicationAdministration",
"id": "19727",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:51.255+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timalfasina"
}
]
},
"effectivePeriod": {
"start": "2016-11-24",
"end": "2016-10-07"
}
}
> *
print COOKIES
10:35:48.130 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:48.131 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:48.131 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FV3GuY6kxQxWWUFL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19727/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19727/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:48.132 [print] {
"resourceType": "MedicationAdministration",
"id": "19727",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:51.255+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timalfasina"
}
]
},
"effectivePeriod": {
"start": "2016-11-24",
"end": "2016-10-07"
}
}
> *
print COOKIES
10:35:48.132 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:48.750 [print] {
"resourceType": "MedicationAdministration",
"id": "19727",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:51.255+02:00",
"source": "#FV3GuY6kxQxWWUFL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timalfasina"
}
]
},
"effectivePeriod": {
"start": "2016-11-24",
"end": "2016-10-07"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:49.352 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:49.943 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:52.479+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:52.479+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:49.944 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB02",
"display": "Mercaptopurina"
}
]
},
"effectivePeriod": {
"start": "2017-05-05",
"end": "2016-12-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:50.554 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:50.555 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xgKY8nA73ZCO8j4e"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19728/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19728/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:50.555 [print] {
"resourceType": "MedicationAdministration",
"id": "19728",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:53.681+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB02",
"display": "Mercaptopurina"
}
]
},
"effectivePeriod": {
"start": "2017-05-05",
"end": "2016-12-30"
}
}
> *
print COOKIES
10:35:50.555 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:50.556 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:50.556 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xgKY8nA73ZCO8j4e"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19728/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19728/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:50.556 [print] {
"resourceType": "MedicationAdministration",
"id": "19728",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:53.681+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB02",
"display": "Mercaptopurina"
}
]
},
"effectivePeriod": {
"start": "2017-05-05",
"end": "2016-12-30"
}
}
> *
print COOKIES
10:35:50.556 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:51.160 [print] {
"resourceType": "MedicationAdministration",
"id": "19728",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:53.681+02:00",
"source": "#xgKY8nA73ZCO8j4e",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB02",
"display": "Mercaptopurina"
}
]
},
"effectivePeriod": {
"start": "2017-05-05",
"end": "2016-12-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:51.804 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:52.415 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:54.923+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:54.923+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:52.416 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD04",
"display": "Streptozocina"
}
]
},
"effectivePeriod": {
"start": "2017-05-17",
"end": "2017-03-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:53.044 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:53.044 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"d81iEhH2Qx66SSA9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19729/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19729/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:53.044 [print] {
"resourceType": "MedicationAdministration",
"id": "19729",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:56.158+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD04",
"display": "Streptozocina"
}
]
},
"effectivePeriod": {
"start": "2017-05-17",
"end": "2017-03-16"
}
}
> *
print COOKIES
10:35:53.044 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:53.045 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:53.045 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"d81iEhH2Qx66SSA9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19729/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19729/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:53.045 [print] {
"resourceType": "MedicationAdministration",
"id": "19729",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:56.158+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD04",
"display": "Streptozocina"
}
]
},
"effectivePeriod": {
"start": "2017-05-17",
"end": "2017-03-16"
}
}
> *
print COOKIES
10:35:53.045 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:53.638 [print] {
"resourceType": "MedicationAdministration",
"id": "19729",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:56.158+02:00",
"source": "#d81iEhH2Qx66SSA9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD04",
"display": "Streptozocina"
}
]
},
"effectivePeriod": {
"start": "2017-05-17",
"end": "2017-03-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:54.236 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:54.867 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:57.361+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:57.361+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:54.868 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG02",
"display": "Formestano"
}
]
},
"effectivePeriod": {
"start": "2017-06-15",
"end": "2017-03-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:55.501 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:55.501 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4Gb7PqwfRYF2xx5X"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19730/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19730/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:55.501 [print] {
"resourceType": "MedicationAdministration",
"id": "19730",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:58.630+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG02",
"display": "Formestano"
}
]
},
"effectivePeriod": {
"start": "2017-06-15",
"end": "2017-03-28"
}
}
> *
print COOKIES
10:35:55.501 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:55.502 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:55.502 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4Gb7PqwfRYF2xx5X"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19730/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:35:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19730/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:35:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:55.503 [print] {
"resourceType": "MedicationAdministration",
"id": "19730",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:58.630+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG02",
"display": "Formestano"
}
]
},
"effectivePeriod": {
"start": "2017-06-15",
"end": "2017-03-28"
}
}
> *
print COOKIES
10:35:55.503 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:56.116 [print] {
"resourceType": "MedicationAdministration",
"id": "19730",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:35:58.630+02:00",
"source": "#4Gb7PqwfRYF2xx5X",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG02",
"display": "Formestano"
}
]
},
"effectivePeriod": {
"start": "2017-06-15",
"end": "2017-03-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:56.761 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:57.382 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:35:59.883+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:35:59.883+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:57.383 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG04",
"display": "Letrozolo"
}
]
},
"effectivePeriod": {
"start": "2017-11-07",
"end": "2017-07-07"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:58.194 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:58.194 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3WsDHeTpB3s1JRjy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19731/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19731/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:58.194 [print] {
"resourceType": "MedicationAdministration",
"id": "19731",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:01.123+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG04",
"display": "Letrozolo"
}
]
},
"effectivePeriod": {
"start": "2017-11-07",
"end": "2017-07-07"
}
}
> *
print COOKIES
10:35:58.194 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:35:58.196 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:35:58.196 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3WsDHeTpB3s1JRjy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19731/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19731/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:35:58.196 [print] {
"resourceType": "MedicationAdministration",
"id": "19731",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:01.123+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG04",
"display": "Letrozolo"
}
]
},
"effectivePeriod": {
"start": "2017-11-07",
"end": "2017-07-07"
}
}
> *
print COOKIES
10:35:58.196 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:35:58.786 [print] {
"resourceType": "MedicationAdministration",
"id": "19731",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:01.123+02:00",
"source": "#3WsDHeTpB3s1JRjy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG04",
"display": "Letrozolo"
}
]
},
"effectivePeriod": {
"start": "2017-11-07",
"end": "2017-07-07"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:35:59.394 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:35:59.992 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:36:02.521+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:36:02.521+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:35:59.993 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE05",
"display": "Sorafenib"
}
]
},
"effectivePeriod": {
"start": "2012-09-19",
"end": "2012-12-04"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:00.697 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:00.697 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"j3FsvSeE5BIkBJdY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19732/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19732/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:00.697 [print] {
"resourceType": "MedicationAdministration",
"id": "19732",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:03.825+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE05",
"display": "Sorafenib"
}
]
},
"effectivePeriod": {
"start": "2012-09-19",
"end": "2012-12-04"
}
}
> *
print COOKIES
10:36:00.697 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:00.699 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:00.699 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"j3FsvSeE5BIkBJdY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19732/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19732/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:00.699 [print] {
"resourceType": "MedicationAdministration",
"id": "19732",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:03.825+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE05",
"display": "Sorafenib"
}
]
},
"effectivePeriod": {
"start": "2012-09-19",
"end": "2012-12-04"
}
}
> *
print COOKIES
10:36:00.700 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:36:01.321 [print] {
"resourceType": "MedicationAdministration",
"id": "19732",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:03.825+02:00",
"source": "#j3FsvSeE5BIkBJdY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE05",
"display": "Sorafenib"
}
]
},
"effectivePeriod": {
"start": "2012-09-19",
"end": "2012-12-04"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:36:01.934 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:36:02.566 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:36:05.065+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:36:05.065+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:36:02.568 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX46",
"display": "Olaparib"
}
]
},
"effectivePeriod": {
"start": "2012-12-19",
"end": "2013-12-04"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:03.203 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:03.203 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6mBIDsFi0amMl5oa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19733/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19733/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:03.203 [print] {
"resourceType": "MedicationAdministration",
"id": "19733",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:06.322+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX46",
"display": "Olaparib"
}
]
},
"effectivePeriod": {
"start": "2012-12-19",
"end": "2013-12-04"
}
}
> *
print COOKIES
10:36:03.203 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:03.206 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:03.206 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6mBIDsFi0amMl5oa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19733/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19733/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:03.206 [print] {
"resourceType": "MedicationAdministration",
"id": "19733",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:06.322+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX46",
"display": "Olaparib"
}
]
},
"effectivePeriod": {
"start": "2012-12-19",
"end": "2013-12-04"
}
}
> *
print COOKIES
10:36:03.206 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:36:03.815 [print] {
"resourceType": "MedicationAdministration",
"id": "19733",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:06.322+02:00",
"source": "#6mBIDsFi0amMl5oa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX46",
"display": "Olaparib"
}
]
},
"effectivePeriod": {
"start": "2012-12-19",
"end": "2013-12-04"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:36:04.565 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:36:05.265 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:36:07.685+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:36:07.685+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:36:05.266 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB03",
"display": "Epirubicina "
}
]
},
"effectivePeriod": {
"start": "2013-02-01",
"end": "2014-06-12"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:05.902 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:05.902 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zuUmhBG9NKwZBVrd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19734/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19734/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:05.902 [print] {
"resourceType": "MedicationAdministration",
"id": "19734",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:09.024+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB03",
"display": "Epirubicina "
}
]
},
"effectivePeriod": {
"start": "2013-02-01",
"end": "2014-06-12"
}
}
> *
print COOKIES
10:36:05.902 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:05.904 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:05.904 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zuUmhBG9NKwZBVrd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19734/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19734/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:05.904 [print] {
"resourceType": "MedicationAdministration",
"id": "19734",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:09.024+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB03",
"display": "Epirubicina "
}
]
},
"effectivePeriod": {
"start": "2013-02-01",
"end": "2014-06-12"
}
}
> *
print COOKIES
10:36:05.904 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:36:06.531 [print] {
"resourceType": "MedicationAdministration",
"id": "19734",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:09.024+02:00",
"source": "#zuUmhBG9NKwZBVrd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB03",
"display": "Epirubicina "
}
]
},
"effectivePeriod": {
"start": "2013-02-01",
"end": "2014-06-12"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:36:07.183 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:36:07.789 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:36:10.312+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:36:10.312+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:36:07.790 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE03",
"display": "Goserelina"
}
]
},
"effectivePeriod": {
"start": "2013-08-06",
"end": "2014-10-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:08.960 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:08.960 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"k5GBuQ0yZaoBJNms"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19735/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19735/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:08.960 [print] {
"resourceType": "MedicationAdministration",
"id": "19735",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:12.089+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE03",
"display": "Goserelina"
}
]
},
"effectivePeriod": {
"start": "2013-08-06",
"end": "2014-10-17"
}
}
> *
print COOKIES
10:36:08.960 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:08.962 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:08.963 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"k5GBuQ0yZaoBJNms"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19735/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19735/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:08.963 [print] {
"resourceType": "MedicationAdministration",
"id": "19735",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:12.089+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE03",
"display": "Goserelina"
}
]
},
"effectivePeriod": {
"start": "2013-08-06",
"end": "2014-10-17"
}
}
> *
print COOKIES
10:36:08.963 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:36:09.573 [print] {
"resourceType": "MedicationAdministration",
"id": "19735",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:12.089+02:00",
"source": "#k5GBuQ0yZaoBJNms",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE03",
"display": "Goserelina"
}
]
},
"effectivePeriod": {
"start": "2013-08-06",
"end": "2014-10-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:36:10.189 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:36:10.808 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:36:13.320+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:36:13.320+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:36:10.810 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX52",
"display": "Venetoclax"
}
]
},
"effectivePeriod": {
"start": "2013-12-05",
"end": "2015-01-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:11.455 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:11.455 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jPf0tHX3sBUeWLZ6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19736/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19736/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:11.455 [print] {
"resourceType": "MedicationAdministration",
"id": "19736",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:14.583+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX52",
"display": "Venetoclax"
}
]
},
"effectivePeriod": {
"start": "2013-12-05",
"end": "2015-01-27"
}
}
> *
print COOKIES
10:36:11.455 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:11.457 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:11.457 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jPf0tHX3sBUeWLZ6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19736/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19736/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:11.457 [print] {
"resourceType": "MedicationAdministration",
"id": "19736",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:14.583+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX52",
"display": "Venetoclax"
}
]
},
"effectivePeriod": {
"start": "2013-12-05",
"end": "2015-01-27"
}
}
> *
print COOKIES
10:36:11.457 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:36:12.073 [print] {
"resourceType": "MedicationAdministration",
"id": "19736",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:14.583+02:00",
"source": "#jPf0tHX3sBUeWLZ6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX52",
"display": "Venetoclax"
}
]
},
"effectivePeriod": {
"start": "2013-12-05",
"end": "2015-01-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:36:12.710 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:36:13.318 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:36:15.827+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:36:15.827+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:36:13.319 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB60",
"display": "Peginterferon alfa-2b, combinations"
}
]
},
"effectivePeriod": {
"start": "2014-02-17",
"end": "2015-03-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:13.950 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"664"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:13.950 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eqE5ymkuUABocFT6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19737/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19737/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:13.951 [print] {
"resourceType": "MedicationAdministration",
"id": "19737",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:17.074+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB60",
"display": "Peginterferon alfa-2b, combinations"
}
]
},
"effectivePeriod": {
"start": "2014-02-17",
"end": "2015-03-23"
}
}
> *
print COOKIES
10:36:13.951 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:13.953 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"664"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:13.953 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eqE5ymkuUABocFT6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19737/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19737/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:13.953 [print] {
"resourceType": "MedicationAdministration",
"id": "19737",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:17.074+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB60",
"display": "Peginterferon alfa-2b, combinations"
}
]
},
"effectivePeriod": {
"start": "2014-02-17",
"end": "2015-03-23"
}
}
> *
print COOKIES
10:36:13.953 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:36:14.547 [print] {
"resourceType": "MedicationAdministration",
"id": "19737",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:17.074+02:00",
"source": "#eqE5ymkuUABocFT6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB60",
"display": "Peginterferon alfa-2b, combinations"
}
]
},
"effectivePeriod": {
"start": "2014-02-17",
"end": "2015-03-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:36:15.451 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:36:16.067 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:36:18.572+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:36:18.572+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:36:16.068 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX27",
"display": "Arsenico triossido"
}
]
},
"effectivePeriod": {
"start": "2014-07-04",
"end": "2015-04-09"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:16.715 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"647"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:16.715 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0Ab8iDDaN1XaRUbF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19738/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19738/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:16.715 [print] {
"resourceType": "MedicationAdministration",
"id": "19738",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:19.833+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX27",
"display": "Arsenico triossido"
}
]
},
"effectivePeriod": {
"start": "2014-07-04",
"end": "2015-04-09"
}
}
> *
print COOKIES
10:36:16.715 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:16.717 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"647"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:16.717 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0Ab8iDDaN1XaRUbF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19738/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19738/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:16.717 [print] {
"resourceType": "MedicationAdministration",
"id": "19738",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:19.833+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX27",
"display": "Arsenico triossido"
}
]
},
"effectivePeriod": {
"start": "2014-07-04",
"end": "2015-04-09"
}
}
> *
print COOKIES
10:36:16.717 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:36:17.329 [print] {
"resourceType": "MedicationAdministration",
"id": "19738",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:19.833+02:00",
"source": "#0Ab8iDDaN1XaRUbF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX27",
"display": "Arsenico triossido"
}
]
},
"effectivePeriod": {
"start": "2014-07-04",
"end": "2015-04-09"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:36:17.964 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:36:18.596 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:36:21.093+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:36:21.093+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:36:18.597 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CB02",
"display": "Teniposide"
}
]
},
"effectivePeriod": {
"start": "2014-08-25",
"end": "2015-05-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:19.211 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:19.211 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9ZZaQymFfJ3cFUBf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19739/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19739/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:19.211 [print] {
"resourceType": "MedicationAdministration",
"id": "19739",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:22.322+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CB02",
"display": "Teniposide"
}
]
},
"effectivePeriod": {
"start": "2014-08-25",
"end": "2015-05-11"
}
}
> *
print COOKIES
10:36:19.211 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:19.213 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:19.213 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9ZZaQymFfJ3cFUBf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19739/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19739/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:19.213 [print] {
"resourceType": "MedicationAdministration",
"id": "19739",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:22.322+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CB02",
"display": "Teniposide"
}
]
},
"effectivePeriod": {
"start": "2014-08-25",
"end": "2015-05-11"
}
}
> *
print COOKIES
10:36:19.213 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:36:19.806 [print] {
"resourceType": "MedicationAdministration",
"id": "19739",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:22.322+02:00",
"source": "#9ZZaQymFfJ3cFUBf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CB02",
"display": "Teniposide"
}
]
},
"effectivePeriod": {
"start": "2014-08-25",
"end": "2015-05-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:36:20.433 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:36:22.042 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:36:23.562+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:36:23.562+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:36:22.044 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA32",
"display": "Apremilast"
}
]
},
"effectivePeriod": {
"start": "2014-09-22",
"end": "2015-07-24"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:22.718 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:22.718 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cbuM7p7usrfBpVUS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19740/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19740/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:22.718 [print] {
"resourceType": "MedicationAdministration",
"id": "19740",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:25.847+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA32",
"display": "Apremilast"
}
]
},
"effectivePeriod": {
"start": "2014-09-22",
"end": "2015-07-24"
}
}
> *
print COOKIES
10:36:22.718 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:22.720 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:22.720 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cbuM7p7usrfBpVUS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19740/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19740/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:22.720 [print] {
"resourceType": "MedicationAdministration",
"id": "19740",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:25.847+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA32",
"display": "Apremilast"
}
]
},
"effectivePeriod": {
"start": "2014-09-22",
"end": "2015-07-24"
}
}
> *
print COOKIES
10:36:22.720 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:36:23.322 [print] {
"resourceType": "MedicationAdministration",
"id": "19740",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:25.847+02:00",
"source": "#cbuM7p7usrfBpVUS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA32",
"display": "Apremilast"
}
]
},
"effectivePeriod": {
"start": "2014-09-22",
"end": "2015-07-24"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:36:23.942 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:36:24.759 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:36:27.071+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:36:27.071+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:36:24.760 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX02",
"display": "Roquinimex"
}
]
},
"effectivePeriod": {
"start": "2014-10-29",
"end": "2015-08-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:25.372 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:25.372 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uHbB7MmqVda5ByYD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19741/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19741/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:25.372 [print] {
"resourceType": "MedicationAdministration",
"id": "19741",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:28.501+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX02",
"display": "Roquinimex"
}
]
},
"effectivePeriod": {
"start": "2014-10-29",
"end": "2015-08-26"
}
}
> *
print COOKIES
10:36:25.372 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:25.373 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:25.373 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uHbB7MmqVda5ByYD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19741/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19741/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:25.373 [print] {
"resourceType": "MedicationAdministration",
"id": "19741",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:28.501+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX02",
"display": "Roquinimex"
}
]
},
"effectivePeriod": {
"start": "2014-10-29",
"end": "2015-08-26"
}
}
> *
print COOKIES
10:36:25.373 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:36:25.979 [print] {
"resourceType": "MedicationAdministration",
"id": "19741",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:28.501+02:00",
"source": "#uHbB7MmqVda5ByYD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX02",
"display": "Roquinimex"
}
]
},
"effectivePeriod": {
"start": "2014-10-29",
"end": "2015-08-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:36:26.620 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:36:27.239 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:36:29.740+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:36:29.740+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:36:27.241 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX36",
"display": "Oblimersen"
}
]
},
"effectivePeriod": {
"start": "2014-12-30",
"end": "2015-09-15"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:27.877 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:27.877 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"z7UcJhxGoVSSkTAg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19742/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19742/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:27.877 [print] {
"resourceType": "MedicationAdministration",
"id": "19742",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:31.006+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX36",
"display": "Oblimersen"
}
]
},
"effectivePeriod": {
"start": "2014-12-30",
"end": "2015-09-15"
}
}
> *
print COOKIES
10:36:27.877 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:27.878 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:27.878 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"z7UcJhxGoVSSkTAg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19742/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19742/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:27.878 [print] {
"resourceType": "MedicationAdministration",
"id": "19742",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:31.006+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX36",
"display": "Oblimersen"
}
]
},
"effectivePeriod": {
"start": "2014-12-30",
"end": "2015-09-15"
}
}
> *
print COOKIES
10:36:27.878 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:36:28.519 [print] {
"resourceType": "MedicationAdministration",
"id": "19742",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:31.006+02:00",
"source": "#z7UcJhxGoVSSkTAg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX36",
"display": "Oblimersen"
}
]
},
"effectivePeriod": {
"start": "2014-12-30",
"end": "2015-09-15"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:36:29.172 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:36:30.135 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:36:32.277+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:36:32.277+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:36:30.136 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB08",
"display": "Interferone beta-1b"
}
]
},
"effectivePeriod": {
"start": "2015-09-23",
"end": "2015-12-02"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:30.847 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:30.847 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B391Zg5m962zAbfB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19743/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19743/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:30.848 [print] {
"resourceType": "MedicationAdministration",
"id": "19743",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:33.975+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB08",
"display": "Interferone beta-1b"
}
]
},
"effectivePeriod": {
"start": "2015-09-23",
"end": "2015-12-02"
}
}
> *
print COOKIES
10:36:30.848 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:30.849 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:30.849 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B391Zg5m962zAbfB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19743/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19743/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:30.849 [print] {
"resourceType": "MedicationAdministration",
"id": "19743",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:33.975+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB08",
"display": "Interferone beta-1b"
}
]
},
"effectivePeriod": {
"start": "2015-09-23",
"end": "2015-12-02"
}
}
> *
print COOKIES
10:36:30.849 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:36:31.471 [print] {
"resourceType": "MedicationAdministration",
"id": "19743",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:33.975+02:00",
"source": "#B391Zg5m962zAbfB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB08",
"display": "Interferone beta-1b"
}
]
},
"effectivePeriod": {
"start": "2015-09-23",
"end": "2015-12-02"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:36:32.091 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:36:32.731 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:36:35.220+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:36:35.220+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:36:32.734 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD01",
"display": "Carmustina"
}
]
},
"effectivePeriod": {
"start": "2015-10-16",
"end": "2015-12-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:34.629 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:34.629 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"D0sSdAvqZScQiqTH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19744/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19744/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:34.629 [print] {
"resourceType": "MedicationAdministration",
"id": "19744",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:37.759+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD01",
"display": "Carmustina"
}
]
},
"effectivePeriod": {
"start": "2015-10-16",
"end": "2015-12-23"
}
}
> *
print COOKIES
10:36:34.629 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:34.630 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:34.630 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"D0sSdAvqZScQiqTH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19744/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19744/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:34.630 [print] {
"resourceType": "MedicationAdministration",
"id": "19744",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:37.759+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD01",
"display": "Carmustina"
}
]
},
"effectivePeriod": {
"start": "2015-10-16",
"end": "2015-12-23"
}
}
> *
print COOKIES
10:36:34.630 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:36:35.226 [print] {
"resourceType": "MedicationAdministration",
"id": "19744",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:37.759+02:00",
"source": "#D0sSdAvqZScQiqTH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD01",
"display": "Carmustina"
}
]
},
"effectivePeriod": {
"start": "2015-10-16",
"end": "2015-12-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:36:35.879 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 13ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 13ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:36:36.507 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:36:38.994+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:36:38.994+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:36:36.508 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA04",
"display": "Satraplatino"
}
]
},
"effectivePeriod": {
"start": "2016-01-08",
"end": "2016-05-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:37.173 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:37.173 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Dcy44i9eJHqfwSFj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19745/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19745/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:37.173 [print] {
"resourceType": "MedicationAdministration",
"id": "19745",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:40.292+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA04",
"display": "Satraplatino"
}
]
},
"effectivePeriod": {
"start": "2016-01-08",
"end": "2016-05-30"
}
}
> *
print COOKIES
10:36:37.173 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:37.174 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:37.174 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Dcy44i9eJHqfwSFj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19745/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19745/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:37.174 [print] {
"resourceType": "MedicationAdministration",
"id": "19745",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:40.292+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA04",
"display": "Satraplatino"
}
]
},
"effectivePeriod": {
"start": "2016-01-08",
"end": "2016-05-30"
}
}
> *
print COOKIES
10:36:37.174 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:36:37.848 [print] {
"resourceType": "MedicationAdministration",
"id": "19745",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:40.292+02:00",
"source": "#Dcy44i9eJHqfwSFj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA04",
"display": "Satraplatino"
}
]
},
"effectivePeriod": {
"start": "2016-01-08",
"end": "2016-05-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:36:38.489 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:36:39.112 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:36:41.615+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:36:41.615+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:36:39.113 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX10",
"display": "Masoprocol"
}
]
},
"effectivePeriod": {
"start": "2016-02-08",
"end": "2016-07-21"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:39.711 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:39.711 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6RnwBX1Q3oAae3dn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19746/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19746/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:39.711 [print] {
"resourceType": "MedicationAdministration",
"id": "19746",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:42.841+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX10",
"display": "Masoprocol"
}
]
},
"effectivePeriod": {
"start": "2016-02-08",
"end": "2016-07-21"
}
}
> *
print COOKIES
10:36:39.711 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:39.713 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:39.713 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6RnwBX1Q3oAae3dn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19746/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19746/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:39.713 [print] {
"resourceType": "MedicationAdministration",
"id": "19746",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:42.841+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX10",
"display": "Masoprocol"
}
]
},
"effectivePeriod": {
"start": "2016-02-08",
"end": "2016-07-21"
}
}
> *
print COOKIES
10:36:39.713 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:36:40.322 [print] {
"resourceType": "MedicationAdministration",
"id": "19746",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:42.841+02:00",
"source": "#6RnwBX1Q3oAae3dn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX10",
"display": "Masoprocol"
}
]
},
"effectivePeriod": {
"start": "2016-02-08",
"end": "2016-07-21"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:36:40.934 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:36:41.541 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:36:44.056+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:36:44.056+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:36:41.542 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE28",
"display": "Ceritinib"
}
]
},
"effectivePeriod": {
"start": "2016-04-07",
"end": "2016-12-01"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:42.147 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:42.147 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PD3Q9Fvlt9hbQgIU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19747/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19747/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:42.147 [print] {
"resourceType": "MedicationAdministration",
"id": "19747",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:45.273+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE28",
"display": "Ceritinib"
}
]
},
"effectivePeriod": {
"start": "2016-04-07",
"end": "2016-12-01"
}
}
> *
print COOKIES
10:36:42.147 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:42.148 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:42.148 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PD3Q9Fvlt9hbQgIU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19747/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19747/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:42.148 [print] {
"resourceType": "MedicationAdministration",
"id": "19747",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:45.273+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE28",
"display": "Ceritinib"
}
]
},
"effectivePeriod": {
"start": "2016-04-07",
"end": "2016-12-01"
}
}
> *
print COOKIES
10:36:42.148 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:36:42.755 [print] {
"resourceType": "MedicationAdministration",
"id": "19747",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:45.273+02:00",
"source": "#PD3Q9Fvlt9hbQgIU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE28",
"display": "Ceritinib"
}
]
},
"effectivePeriod": {
"start": "2016-04-07",
"end": "2016-12-01"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:36:43.382 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:36:44.025 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:36:46.511+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:36:46.511+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:36:44.026 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG01",
"display": "Aminoglutetimide"
}
]
},
"effectivePeriod": {
"start": "2016-05-12",
"end": "2016-12-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:44.624 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"645"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:44.624 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7WQ1P1wCyxBcoL49"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19748/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19748/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:44.624 [print] {
"resourceType": "MedicationAdministration",
"id": "19748",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:47.755+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG01",
"display": "Aminoglutetimide"
}
]
},
"effectivePeriod": {
"start": "2016-05-12",
"end": "2016-12-29"
}
}
> *
print COOKIES
10:36:44.624 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:44.625 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"645"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:44.625 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7WQ1P1wCyxBcoL49"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19748/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19748/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:44.625 [print] {
"resourceType": "MedicationAdministration",
"id": "19748",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:47.755+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG01",
"display": "Aminoglutetimide"
}
]
},
"effectivePeriod": {
"start": "2016-05-12",
"end": "2016-12-29"
}
}
> *
print COOKIES
10:36:44.625 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:36:45.254 [print] {
"resourceType": "MedicationAdministration",
"id": "19748",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:47.755+02:00",
"source": "#7WQ1P1wCyxBcoL49",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG01",
"display": "Aminoglutetimide"
}
]
},
"effectivePeriod": {
"start": "2016-05-12",
"end": "2016-12-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:36:45.863 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:36:46.488 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:36:48.987+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:36:48.987+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:36:46.489 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX24",
"display": "Pegaspargase"
}
]
},
"effectivePeriod": {
"start": "2016-06-27",
"end": "2017-03-15"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:47.134 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:47.134 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"641Q1KDivhQrrd7Z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19749/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19749/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:47.134 [print] {
"resourceType": "MedicationAdministration",
"id": "19749",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:50.261+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX24",
"display": "Pegaspargase"
}
]
},
"effectivePeriod": {
"start": "2016-06-27",
"end": "2017-03-15"
}
}
> *
print COOKIES
10:36:47.134 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:47.136 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:47.136 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"641Q1KDivhQrrd7Z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19749/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19749/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:47.136 [print] {
"resourceType": "MedicationAdministration",
"id": "19749",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:50.261+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX24",
"display": "Pegaspargase"
}
]
},
"effectivePeriod": {
"start": "2016-06-27",
"end": "2017-03-15"
}
}
> *
print COOKIES
10:36:47.136 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:36:47.800 [print] {
"resourceType": "MedicationAdministration",
"id": "19749",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:50.261+02:00",
"source": "#641Q1KDivhQrrd7Z",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX24",
"display": "Pegaspargase"
}
]
},
"effectivePeriod": {
"start": "2016-06-27",
"end": "2017-03-15"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:36:49.420 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:36:50.021 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:36:52.545+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:36:52.545+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:36:50.023 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB90",
"display": "Interferone ricombinante omega di origine felina"
}
]
},
"effectivePeriod": {
"start": "2016-07-05",
"end": "2017-04-13"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:50.634 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"677"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:50.634 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TlTAVR8MmQQX0bqt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19750/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19750/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:50.634 [print] {
"resourceType": "MedicationAdministration",
"id": "19750",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:53.750+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB90",
"display": "Interferone ricombinante omega di origine felina"
}
]
},
"effectivePeriod": {
"start": "2016-07-05",
"end": "2017-04-13"
}
}
> *
print COOKIES
10:36:50.634 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:50.636 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"677"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:50.636 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TlTAVR8MmQQX0bqt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19750/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19750/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:50.636 [print] {
"resourceType": "MedicationAdministration",
"id": "19750",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:53.750+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB90",
"display": "Interferone ricombinante omega di origine felina"
}
]
},
"effectivePeriod": {
"start": "2016-07-05",
"end": "2017-04-13"
}
}
> *
print COOKIES
10:36:50.636 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:36:51.263 [print] {
"resourceType": "MedicationAdministration",
"id": "19750",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:53.750+02:00",
"source": "#TlTAVR8MmQQX0bqt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB90",
"display": "Interferone ricombinante omega di origine felina"
}
]
},
"effectivePeriod": {
"start": "2016-07-05",
"end": "2017-04-13"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:36:51.886 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:36:52.484 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:36:55.012+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:36:55.012+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:36:52.486 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX45",
"display": "Carfilzomib"
}
]
},
"effectivePeriod": {
"start": "2016-09-23",
"end": "2017-05-08"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:53.104 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:53.104 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8PBD2G0fgUtstYjb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19751/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19751/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:53.104 [print] {
"resourceType": "MedicationAdministration",
"id": "19751",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:56.234+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX45",
"display": "Carfilzomib"
}
]
},
"effectivePeriod": {
"start": "2016-09-23",
"end": "2017-05-08"
}
}
> *
print COOKIES
10:36:53.104 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:53.106 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:53.106 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8PBD2G0fgUtstYjb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19751/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19751/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:53.106 [print] {
"resourceType": "MedicationAdministration",
"id": "19751",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:56.234+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX45",
"display": "Carfilzomib"
}
]
},
"effectivePeriod": {
"start": "2016-09-23",
"end": "2017-05-08"
}
}
> *
print COOKIES
10:36:53.106 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:36:53.704 [print] {
"resourceType": "MedicationAdministration",
"id": "19751",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:56.234+02:00",
"source": "#8PBD2G0fgUtstYjb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX45",
"display": "Carfilzomib"
}
]
},
"effectivePeriod": {
"start": "2016-09-23",
"end": "2017-05-08"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:36:54.317 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:36:54.907 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:36:57.447+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:36:57.447+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:36:54.909 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX43",
"display": "Vismodegib"
}
]
},
"effectivePeriod": {
"start": "2017-06-27",
"end": "2017-05-22"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:55.541 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:55.541 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XWGxPPArwrO4QrmA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19752/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19752/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:55.541 [print] {
"resourceType": "MedicationAdministration",
"id": "19752",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:58.664+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX43",
"display": "Vismodegib"
}
]
},
"effectivePeriod": {
"start": "2017-06-27",
"end": "2017-05-22"
}
}
> *
print COOKIES
10:36:55.541 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:55.543 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:55.543 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XWGxPPArwrO4QrmA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19752/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:36:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19752/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:36:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:55.543 [print] {
"resourceType": "MedicationAdministration",
"id": "19752",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:58.664+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX43",
"display": "Vismodegib"
}
]
},
"effectivePeriod": {
"start": "2017-06-27",
"end": "2017-05-22"
}
}
> *
print COOKIES
10:36:55.543 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:36:56.357 [print] {
"resourceType": "MedicationAdministration",
"id": "19752",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:36:58.664+02:00",
"source": "#XWGxPPArwrO4QrmA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX43",
"display": "Vismodegib"
}
]
},
"effectivePeriod": {
"start": "2017-06-27",
"end": "2017-05-22"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:36:56.970 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:36:57.591 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:00.100+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:00.100+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:36:57.592 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA22",
"display": "Abetimus"
}
]
},
"effectivePeriod": {
"start": "2017-07-04",
"end": "2017-06-09"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:58.204 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:58.204 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"k8w3mDQV0xdVKVw9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19753/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19753/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:58.204 [print] {
"resourceType": "MedicationAdministration",
"id": "19753",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:01.333+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA22",
"display": "Abetimus"
}
]
},
"effectivePeriod": {
"start": "2017-07-04",
"end": "2017-06-09"
}
}
> *
print COOKIES
10:36:58.204 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:36:58.206 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:36:58.206 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"k8w3mDQV0xdVKVw9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19753/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19753/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:36:58.206 [print] {
"resourceType": "MedicationAdministration",
"id": "19753",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:01.333+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA22",
"display": "Abetimus"
}
]
},
"effectivePeriod": {
"start": "2017-07-04",
"end": "2017-06-09"
}
}
> *
print COOKIES
10:36:58.206 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:36:58.808 [print] {
"resourceType": "MedicationAdministration",
"id": "19753",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:01.333+02:00",
"source": "#k8w3mDQV0xdVKVw9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA22",
"display": "Abetimus"
}
]
},
"effectivePeriod": {
"start": "2017-07-04",
"end": "2017-06-09"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:36:59.434 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:00.050 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:02.562+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:02.562+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:00.052 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC17",
"display": "Nivolumab"
}
]
},
"effectivePeriod": {
"start": "2017-07-28",
"end": "2017-06-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:00.667 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:00.667 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PrT0UyusjeGdCkGw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19754/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19754/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:00.667 [print] {
"resourceType": "MedicationAdministration",
"id": "19754",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:03.786+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC17",
"display": "Nivolumab"
}
]
},
"effectivePeriod": {
"start": "2017-07-28",
"end": "2017-06-30"
}
}
> *
print COOKIES
10:37:00.667 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:00.668 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:00.668 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PrT0UyusjeGdCkGw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19754/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19754/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:00.668 [print] {
"resourceType": "MedicationAdministration",
"id": "19754",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:03.786+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC17",
"display": "Nivolumab"
}
]
},
"effectivePeriod": {
"start": "2017-07-28",
"end": "2017-06-30"
}
}
> *
print COOKIES
10:37:00.668 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:37:01.255 [print] {
"resourceType": "MedicationAdministration",
"id": "19754",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:03.786+02:00",
"source": "#PrT0UyusjeGdCkGw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC17",
"display": "Nivolumab"
}
]
},
"effectivePeriod": {
"start": "2017-07-28",
"end": "2017-06-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:37:01.877 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:02.710 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:05.002+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:05.002+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:02.712 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB03",
"display": "Afelimomab"
}
]
},
"effectivePeriod": {
"start": "2017-09-08",
"end": "2017-08-07"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:04.326 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:04.326 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LMdbjdoPJjimoZgr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19755/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19755/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:04.326 [print] {
"resourceType": "MedicationAdministration",
"id": "19755",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:07.452+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB03",
"display": "Afelimomab"
}
]
},
"effectivePeriod": {
"start": "2017-09-08",
"end": "2017-08-07"
}
}
> *
print COOKIES
10:37:04.326 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:04.327 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:04.327 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LMdbjdoPJjimoZgr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19755/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19755/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:04.327 [print] {
"resourceType": "MedicationAdministration",
"id": "19755",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:07.452+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB03",
"display": "Afelimomab"
}
]
},
"effectivePeriod": {
"start": "2017-09-08",
"end": "2017-08-07"
}
}
> *
print COOKIES
10:37:04.327 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:37:04.955 [print] {
"resourceType": "MedicationAdministration",
"id": "19755",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:07.452+02:00",
"source": "#LMdbjdoPJjimoZgr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB03",
"display": "Afelimomab"
}
]
},
"effectivePeriod": {
"start": "2017-09-08",
"end": "2017-08-07"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:37:05.568 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:06.172 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:08.698+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:08.698+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:06.173 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB06",
"display": "Golimumab"
}
]
},
"effectivePeriod": {
"start": "2017-10-06",
"end": "2017-10-10"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:06.783 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:06.784 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mHAH6EcToAFV58Vd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19756/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19756/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:06.784 [print] {
"resourceType": "MedicationAdministration",
"id": "19756",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:09.911+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB06",
"display": "Golimumab"
}
]
},
"effectivePeriod": {
"start": "2017-10-06",
"end": "2017-10-10"
}
}
> *
print COOKIES
10:37:06.784 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:06.785 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:06.785 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mHAH6EcToAFV58Vd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19756/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19756/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:06.785 [print] {
"resourceType": "MedicationAdministration",
"id": "19756",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:09.911+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB06",
"display": "Golimumab"
}
]
},
"effectivePeriod": {
"start": "2017-10-06",
"end": "2017-10-10"
}
}
> *
print COOKIES
10:37:06.785 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:37:07.392 [print] {
"resourceType": "MedicationAdministration",
"id": "19756",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:09.911+02:00",
"source": "#mHAH6EcToAFV58Vd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB06",
"display": "Golimumab"
}
]
},
"effectivePeriod": {
"start": "2017-10-06",
"end": "2017-10-10"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:37:08.011 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:08.624 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:11.135+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:11.135+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:08.626 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX39",
"display": "Romidepsin"
}
]
},
"effectivePeriod": {
"start": "2013-01-21",
"end": "2013-02-13"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:09.228 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:09.228 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"R6Z13hhq7lWkK3qN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19757/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19757/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:09.228 [print] {
"resourceType": "MedicationAdministration",
"id": "19757",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:12.356+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX39",
"display": "Romidepsin"
}
]
},
"effectivePeriod": {
"start": "2013-01-21",
"end": "2013-02-13"
}
}
> *
print COOKIES
10:37:09.228 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:09.230 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:09.230 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"R6Z13hhq7lWkK3qN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19757/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19757/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:09.230 [print] {
"resourceType": "MedicationAdministration",
"id": "19757",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:12.356+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX39",
"display": "Romidepsin"
}
]
},
"effectivePeriod": {
"start": "2013-01-21",
"end": "2013-02-13"
}
}
> *
print COOKIES
10:37:09.230 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:37:09.834 [print] {
"resourceType": "MedicationAdministration",
"id": "19757",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:12.356+02:00",
"source": "#R6Z13hhq7lWkK3qN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX39",
"display": "Romidepsin"
}
]
},
"effectivePeriod": {
"start": "2013-01-21",
"end": "2013-02-13"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:37:10.453 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:11.078 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:13.584+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:13.584+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:11.080 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timosina alfa-1"
}
]
},
"effectivePeriod": {
"start": "2013-05-06",
"end": "2013-04-05"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:11.676 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:11.676 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ni7uu1OW37V8HgMK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19758/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19758/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:11.676 [print] {
"resourceType": "MedicationAdministration",
"id": "19758",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:14.804+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timosina alfa-1"
}
]
},
"effectivePeriod": {
"start": "2013-05-06",
"end": "2013-04-05"
}
}
> *
print COOKIES
10:37:11.676 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:11.678 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:11.678 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ni7uu1OW37V8HgMK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19758/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19758/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:11.678 [print] {
"resourceType": "MedicationAdministration",
"id": "19758",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:14.804+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timosina alfa-1"
}
]
},
"effectivePeriod": {
"start": "2013-05-06",
"end": "2013-04-05"
}
}
> *
print COOKIES
10:37:11.678 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:37:12.345 [print] {
"resourceType": "MedicationAdministration",
"id": "19758",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:14.804+02:00",
"source": "#Ni7uu1OW37V8HgMK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX",
"display": "Timosina alfa-1"
}
]
},
"effectivePeriod": {
"start": "2013-05-06",
"end": "2013-04-05"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:37:12.961 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:13.626 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:16.089+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:16.089+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:13.628 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE11",
"display": "Pazopanib "
}
]
},
"effectivePeriod": {
"start": "2013-06-12",
"end": "2013-06-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:14.244 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:14.244 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fw3OChsAzwERCmFY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19759/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19759/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:14.244 [print] {
"resourceType": "MedicationAdministration",
"id": "19759",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:17.365+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE11",
"display": "Pazopanib "
}
]
},
"effectivePeriod": {
"start": "2013-06-12",
"end": "2013-06-27"
}
}
> *
print COOKIES
10:37:14.244 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:14.245 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:14.245 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fw3OChsAzwERCmFY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19759/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19759/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:14.245 [print] {
"resourceType": "MedicationAdministration",
"id": "19759",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:17.365+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE11",
"display": "Pazopanib "
}
]
},
"effectivePeriod": {
"start": "2013-06-12",
"end": "2013-06-27"
}
}
> *
print COOKIES
10:37:14.245 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:37:14.845 [print] {
"resourceType": "MedicationAdministration",
"id": "19759",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:17.365+02:00",
"source": "#fw3OChsAzwERCmFY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE11",
"display": "Pazopanib "
}
]
},
"effectivePeriod": {
"start": "2013-06-12",
"end": "2013-06-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:37:15.466 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:16.591 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:18.586+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:18.586+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:16.593 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB01",
"display": "Busulfano"
}
]
},
"effectivePeriod": {
"start": "2013-06-24",
"end": "2013-07-12"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:17.203 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:17.203 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DiCdtML3yidcRCzC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19760/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19760/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:17.203 [print] {
"resourceType": "MedicationAdministration",
"id": "19760",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:20.331+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB01",
"display": "Busulfano"
}
]
},
"effectivePeriod": {
"start": "2013-06-24",
"end": "2013-07-12"
}
}
> *
print COOKIES
10:37:17.203 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:17.205 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:17.205 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DiCdtML3yidcRCzC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19760/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19760/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:17.205 [print] {
"resourceType": "MedicationAdministration",
"id": "19760",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:20.331+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB01",
"display": "Busulfano"
}
]
},
"effectivePeriod": {
"start": "2013-06-24",
"end": "2013-07-12"
}
}
> *
print COOKIES
10:37:17.205 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:37:17.829 [print] {
"resourceType": "MedicationAdministration",
"id": "19760",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:20.331+02:00",
"source": "#DiCdtML3yidcRCzC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB01",
"display": "Busulfano"
}
]
},
"effectivePeriod": {
"start": "2013-06-24",
"end": "2013-07-12"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:37:18.442 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:19.029 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:21.567+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:21.567+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:19.031 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC10",
"display": "Ofatumumab"
}
]
},
"effectivePeriod": {
"start": "2013-08-08",
"end": "2013-10-02"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:19.695 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:19.695 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"l8HcAX5bhAbGBeak"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19761/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19761/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:19.695 [print] {
"resourceType": "MedicationAdministration",
"id": "19761",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:22.825+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC10",
"display": "Ofatumumab"
}
]
},
"effectivePeriod": {
"start": "2013-08-08",
"end": "2013-10-02"
}
}
> *
print COOKIES
10:37:19.695 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:19.696 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:19.696 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"l8HcAX5bhAbGBeak"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19761/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19761/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:19.696 [print] {
"resourceType": "MedicationAdministration",
"id": "19761",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:22.825+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC10",
"display": "Ofatumumab"
}
]
},
"effectivePeriod": {
"start": "2013-08-08",
"end": "2013-10-02"
}
}
> *
print COOKIES
10:37:19.696 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:37:20.287 [print] {
"resourceType": "MedicationAdministration",
"id": "19761",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:22.825+02:00",
"source": "#l8HcAX5bhAbGBeak",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC10",
"display": "Ofatumumab"
}
]
},
"effectivePeriod": {
"start": "2013-08-08",
"end": "2013-10-02"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:37:21.903 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:23.519 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:25.034+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:25.034+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:23.520 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DA01",
"display": "Dactinomicina"
}
]
},
"effectivePeriod": {
"start": "2013-09-05",
"end": "2014-03-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:24.151 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:24.151 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kkvLahSI06HuY0CG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19762/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19762/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:24.151 [print] {
"resourceType": "MedicationAdministration",
"id": "19762",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:27.280+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DA01",
"display": "Dactinomicina"
}
]
},
"effectivePeriod": {
"start": "2013-09-05",
"end": "2014-03-11"
}
}
> *
print COOKIES
10:37:24.151 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:24.153 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:24.153 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kkvLahSI06HuY0CG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19762/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19762/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:24.153 [print] {
"resourceType": "MedicationAdministration",
"id": "19762",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:27.280+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DA01",
"display": "Dactinomicina"
}
]
},
"effectivePeriod": {
"start": "2013-09-05",
"end": "2014-03-11"
}
}
> *
print COOKIES
10:37:24.153 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:37:24.774 [print] {
"resourceType": "MedicationAdministration",
"id": "19762",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:27.280+02:00",
"source": "#kkvLahSI06HuY0CG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DA01",
"display": "Dactinomicina"
}
]
},
"effectivePeriod": {
"start": "2013-09-05",
"end": "2014-03-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:37:25.366 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:25.994 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:28.496+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:28.496+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:25.995 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB02",
"display": "Medrossiprogesterone "
}
]
},
"effectivePeriod": {
"start": "2013-10-14",
"end": "2014-03-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:26.627 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:26.627 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AUDgvTySrkKHZQ8Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19763/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19763/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:26.627 [print] {
"resourceType": "MedicationAdministration",
"id": "19763",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:29.758+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB02",
"display": "Medrossiprogesterone "
}
]
},
"effectivePeriod": {
"start": "2013-10-14",
"end": "2014-03-26"
}
}
> *
print COOKIES
10:37:26.627 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:26.628 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:26.628 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AUDgvTySrkKHZQ8Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19763/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19763/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:26.628 [print] {
"resourceType": "MedicationAdministration",
"id": "19763",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:29.758+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB02",
"display": "Medrossiprogesterone "
}
]
},
"effectivePeriod": {
"start": "2013-10-14",
"end": "2014-03-26"
}
}
> *
print COOKIES
10:37:26.628 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:37:27.258 [print] {
"resourceType": "MedicationAdministration",
"id": "19763",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:29.758+02:00",
"source": "#AUDgvTySrkKHZQ8Y",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB02",
"display": "Medrossiprogesterone "
}
]
},
"effectivePeriod": {
"start": "2013-10-14",
"end": "2014-03-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:37:27.889 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:28.515 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:31.013+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:31.013+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:28.516 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CX01",
"display": "Trabectedina"
}
]
},
"effectivePeriod": {
"start": "2014-04-28",
"end": "2014-04-08"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:29.155 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:29.155 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JmC1VchqIXMSWoN1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19764/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19764/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:29.155 [print] {
"resourceType": "MedicationAdministration",
"id": "19764",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:32.284+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CX01",
"display": "Trabectedina"
}
]
},
"effectivePeriod": {
"start": "2014-04-28",
"end": "2014-04-08"
}
}
> *
print COOKIES
10:37:29.155 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:29.157 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:29.157 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JmC1VchqIXMSWoN1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19764/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19764/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:29.157 [print] {
"resourceType": "MedicationAdministration",
"id": "19764",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:32.284+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CX01",
"display": "Trabectedina"
}
]
},
"effectivePeriod": {
"start": "2014-04-28",
"end": "2014-04-08"
}
}
> *
print COOKIES
10:37:29.157 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:37:29.804 [print] {
"resourceType": "MedicationAdministration",
"id": "19764",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:32.284+02:00",
"source": "#JmC1VchqIXMSWoN1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CX01",
"display": "Trabectedina"
}
]
},
"effectivePeriod": {
"start": "2014-04-28",
"end": "2014-04-08"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:37:30.468 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:31.092 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:33.567+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:33.567+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:31.093 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA19",
"display": "Gusperimus"
}
]
},
"effectivePeriod": {
"start": "2014-09-30",
"end": "2014-06-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:31.711 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:31.712 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6enwtgZLnvdv9aBG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19765/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19765/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:31.712 [print] {
"resourceType": "MedicationAdministration",
"id": "19765",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:34.840+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA19",
"display": "Gusperimus"
}
]
},
"effectivePeriod": {
"start": "2014-09-30",
"end": "2014-06-23"
}
}
> *
print COOKIES
10:37:31.712 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:31.713 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:31.713 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6enwtgZLnvdv9aBG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19765/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19765/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:31.713 [print] {
"resourceType": "MedicationAdministration",
"id": "19765",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:34.840+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA19",
"display": "Gusperimus"
}
]
},
"effectivePeriod": {
"start": "2014-09-30",
"end": "2014-06-23"
}
}
> *
print COOKIES
10:37:31.713 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:37:32.317 [print] {
"resourceType": "MedicationAdministration",
"id": "19765",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:34.840+02:00",
"source": "#6enwtgZLnvdv9aBG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA19",
"display": "Gusperimus"
}
]
},
"effectivePeriod": {
"start": "2014-09-30",
"end": "2014-06-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:37:33.149 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:33.781 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:36.273+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:36.273+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:33.783 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC13",
"display": "Ixekizumab"
}
]
},
"effectivePeriod": {
"start": "2015-01-12",
"end": "2014-10-01"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:34.413 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:34.413 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TwqDfheWuzNmHXuE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19766/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19766/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:34.413 [print] {
"resourceType": "MedicationAdministration",
"id": "19766",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:37.520+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC13",
"display": "Ixekizumab"
}
]
},
"effectivePeriod": {
"start": "2015-01-12",
"end": "2014-10-01"
}
}
> *
print COOKIES
10:37:34.413 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:34.415 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:34.415 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TwqDfheWuzNmHXuE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19766/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19766/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:34.415 [print] {
"resourceType": "MedicationAdministration",
"id": "19766",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:37.520+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC13",
"display": "Ixekizumab"
}
]
},
"effectivePeriod": {
"start": "2015-01-12",
"end": "2014-10-01"
}
}
> *
print COOKIES
10:37:34.415 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:37:35.002 [print] {
"resourceType": "MedicationAdministration",
"id": "19766",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:37.520+02:00",
"source": "#TwqDfheWuzNmHXuE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC13",
"display": "Ixekizumab"
}
]
},
"effectivePeriod": {
"start": "2015-01-12",
"end": "2014-10-01"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:37:35.709 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:36.319 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:38.836+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:38.836+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:36.321 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB08",
"display": "Pirarubicina"
}
]
},
"effectivePeriod": {
"start": "2015-02-17",
"end": "2014-11-10"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:36.975 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:36.975 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"809FfJawqiwW1bQD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19767/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19767/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:36.975 [print] {
"resourceType": "MedicationAdministration",
"id": "19767",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:40.106+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB08",
"display": "Pirarubicina"
}
]
},
"effectivePeriod": {
"start": "2015-02-17",
"end": "2014-11-10"
}
}
> *
print COOKIES
10:37:36.975 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:36.977 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:36.977 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"809FfJawqiwW1bQD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19767/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19767/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:36.977 [print] {
"resourceType": "MedicationAdministration",
"id": "19767",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:40.106+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB08",
"display": "Pirarubicina"
}
]
},
"effectivePeriod": {
"start": "2015-02-17",
"end": "2014-11-10"
}
}
> *
print COOKIES
10:37:36.977 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:37:37.583 [print] {
"resourceType": "MedicationAdministration",
"id": "19767",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:40.106+02:00",
"source": "#809FfJawqiwW1bQD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB08",
"display": "Pirarubicina"
}
]
},
"effectivePeriod": {
"start": "2015-02-17",
"end": "2014-11-10"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:37:38.213 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:38.821 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:41.343+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:41.343+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:38.823 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE01",
"display": "Buserelina "
}
]
},
"effectivePeriod": {
"start": "2015-05-06",
"end": "2015-01-05"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:39.424 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:39.424 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XrvxKO7erVOE8G2C"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19768/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19768/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:39.424 [print] {
"resourceType": "MedicationAdministration",
"id": "19768",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:42.554+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE01",
"display": "Buserelina "
}
]
},
"effectivePeriod": {
"start": "2015-05-06",
"end": "2015-01-05"
}
}
> *
print COOKIES
10:37:39.424 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:39.426 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:39.426 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XrvxKO7erVOE8G2C"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19768/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19768/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:39.426 [print] {
"resourceType": "MedicationAdministration",
"id": "19768",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:42.554+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE01",
"display": "Buserelina "
}
]
},
"effectivePeriod": {
"start": "2015-05-06",
"end": "2015-01-05"
}
}
> *
print COOKIES
10:37:39.426 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:37:40.040 [print] {
"resourceType": "MedicationAdministration",
"id": "19768",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:42.554+02:00",
"source": "#XrvxKO7erVOE8G2C",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE01",
"display": "Buserelina "
}
]
},
"effectivePeriod": {
"start": "2015-05-06",
"end": "2015-01-05"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:37:40.659 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:41.259 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:43.790+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:43.790+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:41.261 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC19",
"display": "Blinatumomab"
}
]
},
"effectivePeriod": {
"start": "2015-11-03",
"end": "2015-05-08"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:41.893 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:41.893 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aJWh4IH3HNpwPelh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19769/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19769/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:41.894 [print] {
"resourceType": "MedicationAdministration",
"id": "19769",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:45.011+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC19",
"display": "Blinatumomab"
}
]
},
"effectivePeriod": {
"start": "2015-11-03",
"end": "2015-05-08"
}
}
> *
print COOKIES
10:37:41.894 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:41.895 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:41.895 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aJWh4IH3HNpwPelh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19769/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19769/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:41.895 [print] {
"resourceType": "MedicationAdministration",
"id": "19769",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:45.011+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC19",
"display": "Blinatumomab"
}
]
},
"effectivePeriod": {
"start": "2015-11-03",
"end": "2015-05-08"
}
}
> *
print COOKIES
10:37:41.895 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:37:42.478 [print] {
"resourceType": "MedicationAdministration",
"id": "19769",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:45.011+02:00",
"source": "#aJWh4IH3HNpwPelh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC19",
"display": "Blinatumomab"
}
]
},
"effectivePeriod": {
"start": "2015-11-03",
"end": "2015-05-08"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:37:43.082 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:43.706 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:46.209+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:46.209+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:43.708 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB03",
"display": "Mannosulfano"
}
]
},
"effectivePeriod": {
"start": "2015-12-11",
"end": "2015-06-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:44.330 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:44.330 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"P0oxp9IECZPGAgDh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19770/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19770/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:44.330 [print] {
"resourceType": "MedicationAdministration",
"id": "19770",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:47.459+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB03",
"display": "Mannosulfano"
}
]
},
"effectivePeriod": {
"start": "2015-12-11",
"end": "2015-06-17"
}
}
> *
print COOKIES
10:37:44.330 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:44.332 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:44.332 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"P0oxp9IECZPGAgDh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19770/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19770/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:44.332 [print] {
"resourceType": "MedicationAdministration",
"id": "19770",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:47.459+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB03",
"display": "Mannosulfano"
}
]
},
"effectivePeriod": {
"start": "2015-12-11",
"end": "2015-06-17"
}
}
> *
print COOKIES
10:37:44.332 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:37:44.963 [print] {
"resourceType": "MedicationAdministration",
"id": "19770",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:47.459+02:00",
"source": "#P0oxp9IECZPGAgDh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB03",
"display": "Mannosulfano"
}
]
},
"effectivePeriod": {
"start": "2015-12-11",
"end": "2015-06-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:37:45.598 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:46.204 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:48.725+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:48.725+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:46.206 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB01",
"display": "Flutamide"
}
]
},
"effectivePeriod": {
"start": "2015-12-17",
"end": "2015-07-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:46.817 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:46.817 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2YyjzVj1efi8RdMM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19771/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19771/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:46.817 [print] {
"resourceType": "MedicationAdministration",
"id": "19771",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:49.943+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB01",
"display": "Flutamide"
}
]
},
"effectivePeriod": {
"start": "2015-12-17",
"end": "2015-07-16"
}
}
> *
print COOKIES
10:37:46.817 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:46.819 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:46.819 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2YyjzVj1efi8RdMM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19771/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19771/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:46.819 [print] {
"resourceType": "MedicationAdministration",
"id": "19771",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:49.943+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB01",
"display": "Flutamide"
}
]
},
"effectivePeriod": {
"start": "2015-12-17",
"end": "2015-07-16"
}
}
> *
print COOKIES
10:37:46.819 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:37:47.443 [print] {
"resourceType": "MedicationAdministration",
"id": "19771",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:49.943+02:00",
"source": "#2YyjzVj1efi8RdMM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BB01",
"display": "Flutamide"
}
]
},
"effectivePeriod": {
"start": "2015-12-17",
"end": "2015-07-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:37:48.067 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:48.681 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:51.190+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:51.190+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:48.683 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC09",
"display": "Catumaxomab"
}
]
},
"effectivePeriod": {
"start": "2016-03-22",
"end": "2015-08-12"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:49.297 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:49.298 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zZRxUOug1VPcuG6L"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19772/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19772/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:49.298 [print] {
"resourceType": "MedicationAdministration",
"id": "19772",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:52.426+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC09",
"display": "Catumaxomab"
}
]
},
"effectivePeriod": {
"start": "2016-03-22",
"end": "2015-08-12"
}
}
> *
print COOKIES
10:37:49.298 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:49.299 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:49.299 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zZRxUOug1VPcuG6L"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19772/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19772/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:49.299 [print] {
"resourceType": "MedicationAdministration",
"id": "19772",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:52.426+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC09",
"display": "Catumaxomab"
}
]
},
"effectivePeriod": {
"start": "2016-03-22",
"end": "2015-08-12"
}
}
> *
print COOKIES
10:37:49.299 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:37:49.896 [print] {
"resourceType": "MedicationAdministration",
"id": "19772",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:52.426+02:00",
"source": "#zZRxUOug1VPcuG6L",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC09",
"display": "Catumaxomab"
}
]
},
"effectivePeriod": {
"start": "2016-03-22",
"end": "2015-08-12"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:37:50.537 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:51.176 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:53.647+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:53.647+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:51.178 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AC02",
"display": "Oprelvekin"
}
]
},
"effectivePeriod": {
"start": "2016-05-13",
"end": "2015-12-31"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:51.830 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:51.830 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tht7HGVZoZGwjIEC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19773/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19773/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:51.830 [print] {
"resourceType": "MedicationAdministration",
"id": "19773",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:54.953+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AC02",
"display": "Oprelvekin"
}
]
},
"effectivePeriod": {
"start": "2016-05-13",
"end": "2015-12-31"
}
}
> *
print COOKIES
10:37:51.830 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:51.832 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:51.832 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tht7HGVZoZGwjIEC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19773/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19773/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:51.832 [print] {
"resourceType": "MedicationAdministration",
"id": "19773",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:54.953+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AC02",
"display": "Oprelvekin"
}
]
},
"effectivePeriod": {
"start": "2016-05-13",
"end": "2015-12-31"
}
}
> *
print COOKIES
10:37:51.832 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:37:52.430 [print] {
"resourceType": "MedicationAdministration",
"id": "19773",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:54.953+02:00",
"source": "#tht7HGVZoZGwjIEC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AC02",
"display": "Oprelvekin"
}
]
},
"effectivePeriod": {
"start": "2016-05-13",
"end": "2015-12-31"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:37:53.073 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:53.692 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:56.199+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:56.199+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:53.694 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC06",
"display": "Mepolizumab"
}
]
},
"effectivePeriod": {
"start": "2016-06-17",
"end": "2016-03-15"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:54.774 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:54.774 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Fysp9TgsVZfWjape"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19774/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19774/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:54.774 [print] {
"resourceType": "MedicationAdministration",
"id": "19774",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:57.893+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC06",
"display": "Mepolizumab"
}
]
},
"effectivePeriod": {
"start": "2016-06-17",
"end": "2016-03-15"
}
}
> *
print COOKIES
10:37:54.774 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:54.776 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:54.776 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Fysp9TgsVZfWjape"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19774/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:37:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19774/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:37:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:54.776 [print] {
"resourceType": "MedicationAdministration",
"id": "19774",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:57.893+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC06",
"display": "Mepolizumab"
}
]
},
"effectivePeriod": {
"start": "2016-06-17",
"end": "2016-03-15"
}
}
> *
print COOKIES
10:37:54.776 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:37:55.371 [print] {
"resourceType": "MedicationAdministration",
"id": "19774",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:37:57.893+02:00",
"source": "#Fysp9TgsVZfWjape",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC06",
"display": "Mepolizumab"
}
]
},
"effectivePeriod": {
"start": "2016-06-17",
"end": "2016-03-15"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:37:55.997 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:56.655 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:37:59.118+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:37:59.118+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:56.656 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XB01",
"display": "Procarbazina "
}
]
},
"effectivePeriod": {
"start": "2016-07-27",
"end": "2016-07-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:57.316 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:57.316 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EZt5AtxFZc1S6qb3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19775/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19775/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:57.316 [print] {
"resourceType": "MedicationAdministration",
"id": "19775",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:00.441+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XB01",
"display": "Procarbazina "
}
]
},
"effectivePeriod": {
"start": "2016-07-27",
"end": "2016-07-29"
}
}
> *
print COOKIES
10:37:57.316 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:57.318 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:57.318 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EZt5AtxFZc1S6qb3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19775/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19775/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:57.318 [print] {
"resourceType": "MedicationAdministration",
"id": "19775",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:00.441+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XB01",
"display": "Procarbazina "
}
]
},
"effectivePeriod": {
"start": "2016-07-27",
"end": "2016-07-29"
}
}
> *
print COOKIES
10:37:57.318 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:37:57.935 [print] {
"resourceType": "MedicationAdministration",
"id": "19775",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:00.441+02:00",
"source": "#EZt5AtxFZc1S6qb3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XB01",
"display": "Procarbazina "
}
]
},
"effectivePeriod": {
"start": "2016-07-27",
"end": "2016-07-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:37:58.584 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:37:59.237 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:38:01.704+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:38:01.704+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:37:59.238 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB07",
"display": "Interferone beta-1a"
}
]
},
"effectivePeriod": {
"start": "2016-08-18",
"end": "2016-09-05"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:59.912 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:59.912 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"brLkYKddH0GrAqvd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19776/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19776/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:59.912 [print] {
"resourceType": "MedicationAdministration",
"id": "19776",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:03.032+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB07",
"display": "Interferone beta-1a"
}
]
},
"effectivePeriod": {
"start": "2016-08-18",
"end": "2016-09-05"
}
}
> *
print COOKIES
10:37:59.912 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:37:59.914 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:37:59.914 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"brLkYKddH0GrAqvd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19776/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19776/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:37:59.914 [print] {
"resourceType": "MedicationAdministration",
"id": "19776",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:03.032+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB07",
"display": "Interferone beta-1a"
}
]
},
"effectivePeriod": {
"start": "2016-08-18",
"end": "2016-09-05"
}
}
> *
print COOKIES
10:37:59.914 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:38:00.513 [print] {
"resourceType": "MedicationAdministration",
"id": "19776",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:03.032+02:00",
"source": "#brLkYKddH0GrAqvd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB07",
"display": "Interferone beta-1a"
}
]
},
"effectivePeriod": {
"start": "2016-08-18",
"end": "2016-09-05"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:38:02.430 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:38:03.075 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:38:05.558+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:38:05.558+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:38:03.077 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Cytarabina"
}
]
},
"effectivePeriod": {
"start": "2016-10-10",
"end": "2016-12-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:03.694 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:03.694 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"c3XrfeL1uGjq3pcv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19777/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19777/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:03.694 [print] {
"resourceType": "MedicationAdministration",
"id": "19777",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:06.820+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Cytarabina"
}
]
},
"effectivePeriod": {
"start": "2016-10-10",
"end": "2016-12-23"
}
}
> *
print COOKIES
10:38:03.694 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:03.695 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:03.695 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"c3XrfeL1uGjq3pcv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19777/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19777/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:03.695 [print] {
"resourceType": "MedicationAdministration",
"id": "19777",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:06.820+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Cytarabina"
}
]
},
"effectivePeriod": {
"start": "2016-10-10",
"end": "2016-12-23"
}
}
> *
print COOKIES
10:38:03.695 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:38:04.293 [print] {
"resourceType": "MedicationAdministration",
"id": "19777",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:06.820+02:00",
"source": "#c3XrfeL1uGjq3pcv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Cytarabina"
}
]
},
"effectivePeriod": {
"start": "2016-10-10",
"end": "2016-12-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:38:05.127 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:38:05.744 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:38:08.254+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:38:08.254+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:38:05.745 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE35",
"display": "Osimertinib"
}
]
},
"effectivePeriod": {
"start": "2017-02-01",
"end": "2017-01-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:06.377 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:06.377 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"599MO7aRNYuktTcw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19778/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19778/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:06.377 [print] {
"resourceType": "MedicationAdministration",
"id": "19778",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:09.505+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE35",
"display": "Osimertinib"
}
]
},
"effectivePeriod": {
"start": "2017-02-01",
"end": "2017-01-30"
}
}
> *
print COOKIES
10:38:06.377 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:06.380 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:06.380 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"599MO7aRNYuktTcw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19778/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19778/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:06.380 [print] {
"resourceType": "MedicationAdministration",
"id": "19778",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:09.505+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE35",
"display": "Osimertinib"
}
]
},
"effectivePeriod": {
"start": "2017-02-01",
"end": "2017-01-30"
}
}
> *
print COOKIES
10:38:06.380 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:38:07.012 [print] {
"resourceType": "MedicationAdministration",
"id": "19778",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:09.505+02:00",
"source": "#599MO7aRNYuktTcw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE35",
"display": "Osimertinib"
}
]
},
"effectivePeriod": {
"start": "2017-02-01",
"end": "2017-01-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:38:07.645 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:38:09.254 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:38:10.762+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:38:10.762+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:38:09.256 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB02",
"display": "Interferone beta natural"
}
]
},
"effectivePeriod": {
"start": "2017-05-05",
"end": "2017-04-20"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:09.875 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"653"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:09.875 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ycLeXA4oXpB13aKj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19779/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19779/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:09.875 [print] {
"resourceType": "MedicationAdministration",
"id": "19779",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:12.998+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB02",
"display": "Interferone beta natural"
}
]
},
"effectivePeriod": {
"start": "2017-05-05",
"end": "2017-04-20"
}
}
> *
print COOKIES
10:38:09.875 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:09.877 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"653"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:09.877 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ycLeXA4oXpB13aKj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19779/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19779/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:09.877 [print] {
"resourceType": "MedicationAdministration",
"id": "19779",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:12.998+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB02",
"display": "Interferone beta natural"
}
]
},
"effectivePeriod": {
"start": "2017-05-05",
"end": "2017-04-20"
}
}
> *
print COOKIES
10:38:09.877 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:38:10.476 [print] {
"resourceType": "MedicationAdministration",
"id": "19779",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:12.998+02:00",
"source": "#ycLeXA4oXpB13aKj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB02",
"display": "Interferone beta natural"
}
]
},
"effectivePeriod": {
"start": "2017-05-05",
"end": "2017-04-20"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:38:11.101 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:38:11.718 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:38:14.233+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:38:14.233+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:38:11.719 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB06",
"display": "Clofarabina"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2017-09-05"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:12.566 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:12.566 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"D1aPyKCwcTXdWmYh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19780/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19780/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:12.566 [print] {
"resourceType": "MedicationAdministration",
"id": "19780",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:15.689+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB06",
"display": "Clofarabina"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2017-09-05"
}
}
> *
print COOKIES
10:38:12.566 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:12.569 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:12.569 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"D1aPyKCwcTXdWmYh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19780/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19780/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:12.569 [print] {
"resourceType": "MedicationAdministration",
"id": "19780",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:15.689+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB06",
"display": "Clofarabina"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2017-09-05"
}
}
> *
print COOKIES
10:38:12.569 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:38:13.198 [print] {
"resourceType": "MedicationAdministration",
"id": "19780",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:15.689+02:00",
"source": "#D1aPyKCwcTXdWmYh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB06",
"display": "Clofarabina"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2017-09-05"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:38:13.888 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:38:14.486 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:38:17.010+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:38:17.010+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:38:14.487 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC03",
"display": "Trastuzumab"
}
]
},
"effectivePeriod": {
"start": "2017-10-26",
"end": "2017-12-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:15.095 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:15.095 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GhcIS6I73iLS9lGt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19781/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19781/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:15.095 [print] {
"resourceType": "MedicationAdministration",
"id": "19781",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:18.215+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC03",
"display": "Trastuzumab"
}
]
},
"effectivePeriod": {
"start": "2017-10-26",
"end": "2017-12-28"
}
}
> *
print COOKIES
10:38:15.095 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:15.096 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:15.096 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GhcIS6I73iLS9lGt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19781/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19781/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:15.096 [print] {
"resourceType": "MedicationAdministration",
"id": "19781",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:18.215+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC03",
"display": "Trastuzumab"
}
]
},
"effectivePeriod": {
"start": "2017-10-26",
"end": "2017-12-28"
}
}
> *
print COOKIES
10:38:15.096 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:38:15.692 [print] {
"resourceType": "MedicationAdministration",
"id": "19781",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:18.215+02:00",
"source": "#GhcIS6I73iLS9lGt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC03",
"display": "Trastuzumab"
}
]
},
"effectivePeriod": {
"start": "2017-10-26",
"end": "2017-12-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:38:16.312 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:38:16.907 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:38:19.433+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:38:19.433+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:38:16.908 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX03",
"display": "BCG vaccine"
}
]
},
"effectivePeriod": {
"start": "2013-05-15",
"end": "2012-09-18"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:17.537 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:17.537 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"stg7mYo5VwNlNwEd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19782/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19782/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:17.537 [print] {
"resourceType": "MedicationAdministration",
"id": "19782",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:20.650+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX03",
"display": "BCG vaccine"
}
]
},
"effectivePeriod": {
"start": "2013-05-15",
"end": "2012-09-18"
}
}
> *
print COOKIES
10:38:17.537 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:17.538 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:17.538 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"stg7mYo5VwNlNwEd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19782/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19782/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:17.538 [print] {
"resourceType": "MedicationAdministration",
"id": "19782",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:20.650+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX03",
"display": "BCG vaccine"
}
]
},
"effectivePeriod": {
"start": "2013-05-15",
"end": "2012-09-18"
}
}
> *
print COOKIES
10:38:17.538 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:38:18.623 [print] {
"resourceType": "MedicationAdministration",
"id": "19782",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:20.650+02:00",
"source": "#stg7mYo5VwNlNwEd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX03",
"display": "BCG vaccine"
}
]
},
"effectivePeriod": {
"start": "2013-05-15",
"end": "2012-09-18"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:38:19.268 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:38:20.909 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:38:22.398+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:38:22.398+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:38:20.911 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB10",
"display": "Peginterferone alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2013-08-19",
"end": "2012-11-20"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:21.578 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:21.578 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"V8xpcvvpLLhVhvj2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19783/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19783/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:21.578 [print] {
"resourceType": "MedicationAdministration",
"id": "19783",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:24.671+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB10",
"display": "Peginterferone alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2013-08-19",
"end": "2012-11-20"
}
}
> *
print COOKIES
10:38:21.578 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:21.581 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:21.581 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"V8xpcvvpLLhVhvj2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19783/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19783/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:21.581 [print] {
"resourceType": "MedicationAdministration",
"id": "19783",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:24.671+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB10",
"display": "Peginterferone alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2013-08-19",
"end": "2012-11-20"
}
}
> *
print COOKIES
10:38:21.581 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:38:22.596 [print] {
"resourceType": "MedicationAdministration",
"id": "19783",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:24.671+02:00",
"source": "#V8xpcvvpLLhVhvj2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB10",
"display": "Peginterferone alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2013-08-19",
"end": "2012-11-20"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:38:23.228 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 12ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 12ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:38:23.845 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:38:26.343+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:38:26.343+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:38:23.847 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE31",
"display": "Nintedanib"
}
]
},
"effectivePeriod": {
"start": "2013-10-11",
"end": "2013-12-10"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:24.462 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:24.462 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hIstbMlu1d8WW3r6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19784/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19784/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:24.462 [print] {
"resourceType": "MedicationAdministration",
"id": "19784",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:27.591+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE31",
"display": "Nintedanib"
}
]
},
"effectivePeriod": {
"start": "2013-10-11",
"end": "2013-12-10"
}
}
> *
print COOKIES
10:38:24.462 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:24.464 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:24.464 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hIstbMlu1d8WW3r6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19784/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19784/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:24.464 [print] {
"resourceType": "MedicationAdministration",
"id": "19784",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:27.591+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE31",
"display": "Nintedanib"
}
]
},
"effectivePeriod": {
"start": "2013-10-11",
"end": "2013-12-10"
}
}
> *
print COOKIES
10:38:24.464 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:38:25.057 [print] {
"resourceType": "MedicationAdministration",
"id": "19784",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:27.591+02:00",
"source": "#hIstbMlu1d8WW3r6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE31",
"display": "Nintedanib"
}
]
},
"effectivePeriod": {
"start": "2013-10-11",
"end": "2013-12-10"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:38:25.680 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:38:26.279 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:38:28.806+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:38:28.806+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:38:26.280 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX11",
"display": "Estramustina"
}
]
},
"effectivePeriod": {
"start": "2014-01-10",
"end": "2014-01-08"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:26.890 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:26.890 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iFNjSYyHiH6o5wpP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19785/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19785/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:26.890 [print] {
"resourceType": "MedicationAdministration",
"id": "19785",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:30.006+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX11",
"display": "Estramustina"
}
]
},
"effectivePeriod": {
"start": "2014-01-10",
"end": "2014-01-08"
}
}
> *
print COOKIES
10:38:26.890 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:26.892 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:26.892 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iFNjSYyHiH6o5wpP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19785/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19785/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:26.892 [print] {
"resourceType": "MedicationAdministration",
"id": "19785",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:30.006+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX11",
"display": "Estramustina"
}
]
},
"effectivePeriod": {
"start": "2014-01-10",
"end": "2014-01-08"
}
}
> *
print COOKIES
10:38:26.892 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:38:27.538 [print] {
"resourceType": "MedicationAdministration",
"id": "19785",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:30.006+02:00",
"source": "#iFNjSYyHiH6o5wpP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX11",
"display": "Estramustina"
}
]
},
"effectivePeriod": {
"start": "2014-01-10",
"end": "2014-01-08"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:38:28.191 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:38:28.821 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:38:31.304+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:38:31.304+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:38:28.823 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA03",
"display": "Oxaliplatino"
}
]
},
"effectivePeriod": {
"start": "2014-08-05",
"end": "2014-05-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:29.426 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:29.426 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pe6kf73SDN1e75HQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19786/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19786/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:29.426 [print] {
"resourceType": "MedicationAdministration",
"id": "19786",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:32.551+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA03",
"display": "Oxaliplatino"
}
]
},
"effectivePeriod": {
"start": "2014-08-05",
"end": "2014-05-23"
}
}
> *
print COOKIES
10:38:29.426 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:29.428 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:29.428 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pe6kf73SDN1e75HQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19786/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19786/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:29.428 [print] {
"resourceType": "MedicationAdministration",
"id": "19786",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:32.551+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA03",
"display": "Oxaliplatino"
}
]
},
"effectivePeriod": {
"start": "2014-08-05",
"end": "2014-05-23"
}
}
> *
print COOKIES
10:38:29.428 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:38:30.030 [print] {
"resourceType": "MedicationAdministration",
"id": "19786",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:32.551+02:00",
"source": "#pe6kf73SDN1e75HQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA03",
"display": "Oxaliplatino"
}
]
},
"effectivePeriod": {
"start": "2014-08-05",
"end": "2014-05-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:38:30.656 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:38:31.271 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:38:33.771+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:38:33.771+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:38:31.273 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD04",
"display": "Acido 5 aminolevulinico"
}
]
},
"effectivePeriod": {
"start": "2014-09-17",
"end": "2014-06-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:31.990 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"652"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:31.990 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9tYn99KL3MsgNjo8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19787/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19787/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:31.990 [print] {
"resourceType": "MedicationAdministration",
"id": "19787",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:35.118+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD04",
"display": "Acido 5 aminolevulinico"
}
]
},
"effectivePeriod": {
"start": "2014-09-17",
"end": "2014-06-27"
}
}
> *
print COOKIES
10:38:31.990 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:31.991 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"652"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:31.991 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9tYn99KL3MsgNjo8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19787/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19787/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:31.991 [print] {
"resourceType": "MedicationAdministration",
"id": "19787",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:35.118+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD04",
"display": "Acido 5 aminolevulinico"
}
]
},
"effectivePeriod": {
"start": "2014-09-17",
"end": "2014-06-27"
}
}
> *
print COOKIES
10:38:31.991 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:38:32.627 [print] {
"resourceType": "MedicationAdministration",
"id": "19787",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:35.118+02:00",
"source": "#9tYn99KL3MsgNjo8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD04",
"display": "Acido 5 aminolevulinico"
}
]
},
"effectivePeriod": {
"start": "2014-09-17",
"end": "2014-06-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:38:33.265 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:38:33.885 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:38:36.387+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:38:36.387+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:38:33.887 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA04",
"display": "Vinorelbina "
}
]
},
"effectivePeriod": {
"start": "2014-11-26",
"end": "2014-09-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:34.487 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:34.487 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oQKYBPXAxTEyOaAS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19788/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19788/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:34.487 [print] {
"resourceType": "MedicationAdministration",
"id": "19788",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:37.614+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA04",
"display": "Vinorelbina "
}
]
},
"effectivePeriod": {
"start": "2014-11-26",
"end": "2014-09-23"
}
}
> *
print COOKIES
10:38:34.487 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:34.488 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:34.488 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oQKYBPXAxTEyOaAS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19788/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19788/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:34.488 [print] {
"resourceType": "MedicationAdministration",
"id": "19788",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:37.614+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA04",
"display": "Vinorelbina "
}
]
},
"effectivePeriod": {
"start": "2014-11-26",
"end": "2014-09-23"
}
}
> *
print COOKIES
10:38:34.488 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:38:35.072 [print] {
"resourceType": "MedicationAdministration",
"id": "19788",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:37.614+02:00",
"source": "#oQKYBPXAxTEyOaAS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA04",
"display": "Vinorelbina "
}
]
},
"effectivePeriod": {
"start": "2014-11-26",
"end": "2014-09-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:38:35.682 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:38:36.292 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:38:38.809+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:38:38.809+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:38:36.294 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA03",
"display": "Immunoglobulina antilinfocitaria (cavallo)"
}
]
},
"effectivePeriod": {
"start": "2014-12-03",
"end": "2014-11-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:36.935 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"671"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:36.935 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8yP50bfN7In0hIcg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19789/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19789/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:36.935 [print] {
"resourceType": "MedicationAdministration",
"id": "19789",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:40.059+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA03",
"display": "Immunoglobulina antilinfocitaria (cavallo)"
}
]
},
"effectivePeriod": {
"start": "2014-12-03",
"end": "2014-11-28"
}
}
> *
print COOKIES
10:38:36.935 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:36.938 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"671"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:36.938 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8yP50bfN7In0hIcg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19789/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19789/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:36.938 [print] {
"resourceType": "MedicationAdministration",
"id": "19789",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:40.059+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA03",
"display": "Immunoglobulina antilinfocitaria (cavallo)"
}
]
},
"effectivePeriod": {
"start": "2014-12-03",
"end": "2014-11-28"
}
}
> *
print COOKIES
10:38:36.938 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:38:37.544 [print] {
"resourceType": "MedicationAdministration",
"id": "19789",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:40.059+02:00",
"source": "#8yP50bfN7In0hIcg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA03",
"display": "Immunoglobulina antilinfocitaria (cavallo)"
}
]
},
"effectivePeriod": {
"start": "2014-12-03",
"end": "2014-11-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:38:38.398 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:38:39.032 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:38:41.325+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:38:41.325+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:38:39.033 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB05",
"display": "Zorubicina"
}
]
},
"effectivePeriod": {
"start": "2015-07-20",
"end": "2014-12-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:39.651 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:39.651 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"c7oC8lUAqSlVnwI5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19790/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19790/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:39.652 [print] {
"resourceType": "MedicationAdministration",
"id": "19790",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:42.771+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB05",
"display": "Zorubicina"
}
]
},
"effectivePeriod": {
"start": "2015-07-20",
"end": "2014-12-23"
}
}
> *
print COOKIES
10:38:39.652 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:39.653 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:39.653 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"c7oC8lUAqSlVnwI5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19790/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19790/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:39.653 [print] {
"resourceType": "MedicationAdministration",
"id": "19790",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:42.771+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB05",
"display": "Zorubicina"
}
]
},
"effectivePeriod": {
"start": "2015-07-20",
"end": "2014-12-23"
}
}
> *
print COOKIES
10:38:39.653 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:38:40.320 [print] {
"resourceType": "MedicationAdministration",
"id": "19790",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:42.771+02:00",
"source": "#c7oC8lUAqSlVnwI5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB05",
"display": "Zorubicina"
}
]
},
"effectivePeriod": {
"start": "2015-07-20",
"end": "2014-12-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:38:40.936 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:38:41.550 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:38:44.064+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:38:44.064+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:38:41.551 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX14",
"display": "Histamine dihydrochloride"
}
]
},
"effectivePeriod": {
"start": "2015-07-29",
"end": "2015-02-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:42.178 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"654"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:42.178 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TYoXwTSwRQD56nAm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19791/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19791/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:42.178 [print] {
"resourceType": "MedicationAdministration",
"id": "19791",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:45.305+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX14",
"display": "Histamine dihydrochloride"
}
]
},
"effectivePeriod": {
"start": "2015-07-29",
"end": "2015-02-23"
}
}
> *
print COOKIES
10:38:42.178 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:42.179 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"654"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:42.179 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TYoXwTSwRQD56nAm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19791/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19791/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:42.179 [print] {
"resourceType": "MedicationAdministration",
"id": "19791",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:45.305+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX14",
"display": "Histamine dihydrochloride"
}
]
},
"effectivePeriod": {
"start": "2015-07-29",
"end": "2015-02-23"
}
}
> *
print COOKIES
10:38:42.179 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:38:42.784 [print] {
"resourceType": "MedicationAdministration",
"id": "19791",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:45.305+02:00",
"source": "#TYoXwTSwRQD56nAm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX14",
"display": "Histamine dihydrochloride"
}
]
},
"effectivePeriod": {
"start": "2015-07-29",
"end": "2015-02-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:38:43.433 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:38:44.050 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:38:46.551+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:38:46.551+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:38:44.051 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE06",
"display": "Dasatinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-21",
"end": "2015-02-24"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:44.662 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:44.662 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"itLzLGuUywfmIl04"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19792/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19792/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:44.662 [print] {
"resourceType": "MedicationAdministration",
"id": "19792",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:47.791+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE06",
"display": "Dasatinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-21",
"end": "2015-02-24"
}
}
> *
print COOKIES
10:38:44.662 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:44.663 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:44.663 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"itLzLGuUywfmIl04"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19792/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19792/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:44.663 [print] {
"resourceType": "MedicationAdministration",
"id": "19792",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:47.791+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE06",
"display": "Dasatinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-21",
"end": "2015-02-24"
}
}
> *
print COOKIES
10:38:44.663 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:38:45.273 [print] {
"resourceType": "MedicationAdministration",
"id": "19792",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:47.791+02:00",
"source": "#itLzLGuUywfmIl04",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE06",
"display": "Dasatinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-21",
"end": "2015-02-24"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:38:45.895 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:38:46.536 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:38:49.019+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:38:49.019+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:38:46.538 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB01",
"display": "Etanercept"
}
]
},
"effectivePeriod": {
"start": "2015-12-23",
"end": "2015-10-13"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:47.154 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:47.154 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4r921MCSyyCSxa1J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19793/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19793/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:47.155 [print] {
"resourceType": "MedicationAdministration",
"id": "19793",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:50.281+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB01",
"display": "Etanercept"
}
]
},
"effectivePeriod": {
"start": "2015-12-23",
"end": "2015-10-13"
}
}
> *
print COOKIES
10:38:47.155 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:47.156 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:47.156 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4r921MCSyyCSxa1J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19793/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19793/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:47.156 [print] {
"resourceType": "MedicationAdministration",
"id": "19793",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:50.281+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB01",
"display": "Etanercept"
}
]
},
"effectivePeriod": {
"start": "2015-12-23",
"end": "2015-10-13"
}
}
> *
print COOKIES
10:38:47.156 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:38:47.779 [print] {
"resourceType": "MedicationAdministration",
"id": "19793",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:50.281+02:00",
"source": "#4r921MCSyyCSxa1J",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB01",
"display": "Etanercept"
}
]
},
"effectivePeriod": {
"start": "2015-12-23",
"end": "2015-10-13"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:38:48.397 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:38:49.029 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:38:51.514+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:38:51.514+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:38:49.031 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BX03",
"display": "Abiraterone"
}
]
},
"effectivePeriod": {
"start": "2016-01-12",
"end": "2015-10-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:49.680 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:49.680 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Y51ENHuKDhupJhKT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19794/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19794/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:49.680 [print] {
"resourceType": "MedicationAdministration",
"id": "19794",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:52.790+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BX03",
"display": "Abiraterone"
}
]
},
"effectivePeriod": {
"start": "2016-01-12",
"end": "2015-10-30"
}
}
> *
print COOKIES
10:38:49.680 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:49.682 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:49.682 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Y51ENHuKDhupJhKT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19794/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19794/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:49.682 [print] {
"resourceType": "MedicationAdministration",
"id": "19794",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:52.790+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BX03",
"display": "Abiraterone"
}
]
},
"effectivePeriod": {
"start": "2016-01-12",
"end": "2015-10-30"
}
}
> *
print COOKIES
10:38:49.682 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:38:50.273 [print] {
"resourceType": "MedicationAdministration",
"id": "19794",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:52.790+02:00",
"source": "#Y51ENHuKDhupJhKT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BX03",
"display": "Abiraterone"
}
]
},
"effectivePeriod": {
"start": "2016-01-12",
"end": "2015-10-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:38:50.880 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:38:51.477 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:38:54.008+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:38:54.008+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:38:51.479 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE02",
"display": "Leuprorelina "
}
]
},
"effectivePeriod": {
"start": "2016-03-15",
"end": "2015-11-03"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:52.071 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:52.071 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dMuVqwFGVVyfnI0o"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19795/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19795/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:52.071 [print] {
"resourceType": "MedicationAdministration",
"id": "19795",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:55.199+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE02",
"display": "Leuprorelina "
}
]
},
"effectivePeriod": {
"start": "2016-03-15",
"end": "2015-11-03"
}
}
> *
print COOKIES
10:38:52.071 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:52.072 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:52.072 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dMuVqwFGVVyfnI0o"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19795/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19795/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:52.072 [print] {
"resourceType": "MedicationAdministration",
"id": "19795",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:55.199+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE02",
"display": "Leuprorelina "
}
]
},
"effectivePeriod": {
"start": "2016-03-15",
"end": "2015-11-03"
}
}
> *
print COOKIES
10:38:52.072 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:38:52.665 [print] {
"resourceType": "MedicationAdministration",
"id": "19795",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:55.199+02:00",
"source": "#dMuVqwFGVVyfnI0o",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE02",
"display": "Leuprorelina "
}
]
},
"effectivePeriod": {
"start": "2016-03-15",
"end": "2015-11-03"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:38:53.287 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:38:53.933 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:38:56.406+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:38:56.406+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:38:53.935 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC03",
"display": "Mitomicina"
}
]
},
"effectivePeriod": {
"start": "2016-04-22",
"end": "2016-02-04"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:54.528 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:54.528 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9T3FsrIkk3LEq6Rb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19796/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19796/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:54.528 [print] {
"resourceType": "MedicationAdministration",
"id": "19796",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:57.658+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC03",
"display": "Mitomicina"
}
]
},
"effectivePeriod": {
"start": "2016-04-22",
"end": "2016-02-04"
}
}
> *
print COOKIES
10:38:54.528 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:54.531 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:54.531 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9T3FsrIkk3LEq6Rb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19796/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:38:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19796/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:54.531 [print] {
"resourceType": "MedicationAdministration",
"id": "19796",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:57.658+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC03",
"display": "Mitomicina"
}
]
},
"effectivePeriod": {
"start": "2016-04-22",
"end": "2016-02-04"
}
}
> *
print COOKIES
10:38:54.531 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:38:55.158 [print] {
"resourceType": "MedicationAdministration",
"id": "19796",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:38:57.658+02:00",
"source": "#9T3FsrIkk3LEq6Rb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC03",
"display": "Mitomicina"
}
]
},
"effectivePeriod": {
"start": "2016-04-22",
"end": "2016-02-04"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:38:55.787 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:38:56.406 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:38:58.919+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:38:58.919+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:38:56.407 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD01",
"display": "Paclitaxel "
}
]
},
"effectivePeriod": {
"start": "2016-05-19",
"end": "2016-09-21"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:57.034 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:57.034 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5jxhiMq0cxVuWRXo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19797/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19797/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:57.034 [print] {
"resourceType": "MedicationAdministration",
"id": "19797",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:00.153+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD01",
"display": "Paclitaxel "
}
]
},
"effectivePeriod": {
"start": "2016-05-19",
"end": "2016-09-21"
}
}
> *
print COOKIES
10:38:57.034 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:57.037 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:57.037 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5jxhiMq0cxVuWRXo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19797/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19797/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:38:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:57.037 [print] {
"resourceType": "MedicationAdministration",
"id": "19797",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:00.153+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD01",
"display": "Paclitaxel "
}
]
},
"effectivePeriod": {
"start": "2016-05-19",
"end": "2016-09-21"
}
}
> *
print COOKIES
10:38:57.037 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:38:57.670 [print] {
"resourceType": "MedicationAdministration",
"id": "19797",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:00.153+02:00",
"source": "#5jxhiMq0cxVuWRXo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD01",
"display": "Paclitaxel "
}
]
},
"effectivePeriod": {
"start": "2016-05-19",
"end": "2016-09-21"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:38:58.310 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 15ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 15ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:38:58.979 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:01.427+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:01.427+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:38:58.981 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD07",
"display": "Ranimustina"
}
]
},
"effectivePeriod": {
"start": "2016-08-09",
"end": "2016-10-18"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:59.643 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:59.643 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SHvPcuB3qYxgApVo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19798/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19798/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:59.643 [print] {
"resourceType": "MedicationAdministration",
"id": "19798",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:02.759+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD07",
"display": "Ranimustina"
}
]
},
"effectivePeriod": {
"start": "2016-08-09",
"end": "2016-10-18"
}
}
> *
print COOKIES
10:38:59.643 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:38:59.644 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:38:59.644 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SHvPcuB3qYxgApVo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19798/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19798/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:38:59.644 [print] {
"resourceType": "MedicationAdministration",
"id": "19798",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:02.759+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD07",
"display": "Ranimustina"
}
]
},
"effectivePeriod": {
"start": "2016-08-09",
"end": "2016-10-18"
}
}
> *
print COOKIES
10:38:59.644 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:00.241 [print] {
"resourceType": "MedicationAdministration",
"id": "19798",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:02.759+02:00",
"source": "#SHvPcuB3qYxgApVo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD07",
"display": "Ranimustina"
}
]
},
"effectivePeriod": {
"start": "2016-08-09",
"end": "2016-10-18"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:00.873 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:01.485 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:04.002+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:04.002+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:01.487 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA13",
"display": "Leflunomide"
}
]
},
"effectivePeriod": {
"start": "2016-10-04",
"end": "2016-10-25"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:02.116 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:02.116 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vHEAV41GAISb8E8F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19799/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19799/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:02.116 [print] {
"resourceType": "MedicationAdministration",
"id": "19799",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:05.238+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA13",
"display": "Leflunomide"
}
]
},
"effectivePeriod": {
"start": "2016-10-04",
"end": "2016-10-25"
}
}
> *
print COOKIES
10:39:02.116 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:02.117 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:02.117 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vHEAV41GAISb8E8F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19799/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19799/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:02.117 [print] {
"resourceType": "MedicationAdministration",
"id": "19799",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:05.238+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA13",
"display": "Leflunomide"
}
]
},
"effectivePeriod": {
"start": "2016-10-04",
"end": "2016-10-25"
}
}
> *
print COOKIES
10:39:02.117 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:02.704 [print] {
"resourceType": "MedicationAdministration",
"id": "19799",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:05.238+02:00",
"source": "#vHEAV41GAISb8E8F",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA13",
"display": "Leflunomide"
}
]
},
"effectivePeriod": {
"start": "2016-10-04",
"end": "2016-10-25"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:03.325 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:03.979 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:06.451+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:06.451+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:03.981 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA34",
"display": "Alemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2016-10-05",
"end": "2016-12-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:04.612 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:04.612 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NrfqD5iZA7aipcu9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19800/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19800/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:04.612 [print] {
"resourceType": "MedicationAdministration",
"id": "19800",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:07.729+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA34",
"display": "Alemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2016-10-05",
"end": "2016-12-16"
}
}
> *
print COOKIES
10:39:04.612 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:04.614 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:04.614 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NrfqD5iZA7aipcu9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19800/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19800/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:04.614 [print] {
"resourceType": "MedicationAdministration",
"id": "19800",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:07.729+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA34",
"display": "Alemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2016-10-05",
"end": "2016-12-16"
}
}
> *
print COOKIES
10:39:04.614 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:05.225 [print] {
"resourceType": "MedicationAdministration",
"id": "19800",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:07.729+02:00",
"source": "#NrfqD5iZA7aipcu9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA34",
"display": "Alemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2016-10-05",
"end": "2016-12-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:05.863 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:06.459 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:08.989+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:08.989+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:06.460 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD03",
"display": "Semustina"
}
]
},
"effectivePeriod": {
"start": "2017-02-28",
"end": "2017-03-07"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:07.085 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:07.086 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"grysm38VGaj2OOdC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19801/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19801/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:07.086 [print] {
"resourceType": "MedicationAdministration",
"id": "19801",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:10.212+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD03",
"display": "Semustina"
}
]
},
"effectivePeriod": {
"start": "2017-02-28",
"end": "2017-03-07"
}
}
> *
print COOKIES
10:39:07.086 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:07.087 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:07.087 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"grysm38VGaj2OOdC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19801/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19801/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:07.087 [print] {
"resourceType": "MedicationAdministration",
"id": "19801",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:10.212+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD03",
"display": "Semustina"
}
]
},
"effectivePeriod": {
"start": "2017-02-28",
"end": "2017-03-07"
}
}
> *
print COOKIES
10:39:07.087 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:07.692 [print] {
"resourceType": "MedicationAdministration",
"id": "19801",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:10.212+02:00",
"source": "#grysm38VGaj2OOdC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD03",
"display": "Semustina"
}
]
},
"effectivePeriod": {
"start": "2017-02-28",
"end": "2017-03-07"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:08.328 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:08.948 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:11.453+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:11.453+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:08.950 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA13",
"display": "Pegfilgrastim"
}
]
},
"effectivePeriod": {
"start": "2017-03-23",
"end": "2017-03-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:09.552 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:09.552 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3hHVnR3ZlRqeuCen"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19802/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19802/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:09.552 [print] {
"resourceType": "MedicationAdministration",
"id": "19802",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:12.680+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA13",
"display": "Pegfilgrastim"
}
]
},
"effectivePeriod": {
"start": "2017-03-23",
"end": "2017-03-23"
}
}
> *
print COOKIES
10:39:09.552 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:09.554 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:09.554 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3hHVnR3ZlRqeuCen"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19802/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19802/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:09.554 [print] {
"resourceType": "MedicationAdministration",
"id": "19802",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:12.680+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA13",
"display": "Pegfilgrastim"
}
]
},
"effectivePeriod": {
"start": "2017-03-23",
"end": "2017-03-23"
}
}
> *
print COOKIES
10:39:09.554 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:10.141 [print] {
"resourceType": "MedicationAdministration",
"id": "19802",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:12.680+02:00",
"source": "#3hHVnR3ZlRqeuCen",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA13",
"display": "Pegfilgrastim"
}
]
},
"effectivePeriod": {
"start": "2017-03-23",
"end": "2017-03-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:10.762 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:11.629 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:13.890+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:13.890+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:11.631 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC02",
"display": "Basiliximab"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2017-05-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:12.306 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:12.306 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xNZvYQkJR5ludBs8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19803/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19803/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:12.306 [print] {
"resourceType": "MedicationAdministration",
"id": "19803",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:15.427+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC02",
"display": "Basiliximab"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2017-05-11"
}
}
> *
print COOKIES
10:39:12.306 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:12.307 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:12.308 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xNZvYQkJR5ludBs8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19803/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19803/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:12.308 [print] {
"resourceType": "MedicationAdministration",
"id": "19803",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:15.427+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC02",
"display": "Basiliximab"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2017-05-11"
}
}
> *
print COOKIES
10:39:12.308 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:12.931 [print] {
"resourceType": "MedicationAdministration",
"id": "19803",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:15.427+02:00",
"source": "#xNZvYQkJR5ludBs8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC02",
"display": "Basiliximab"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2017-05-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:13.553 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:14.171 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:16.670+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:16.670+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:14.173 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD03",
"display": "Voclosporina"
}
]
},
"effectivePeriod": {
"start": "2017-10-09",
"end": "2017-07-25"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:14.784 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:14.784 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DJbu0oN82YXcTtTE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19804/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19804/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:14.784 [print] {
"resourceType": "MedicationAdministration",
"id": "19804",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:17.913+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD03",
"display": "Voclosporina"
}
]
},
"effectivePeriod": {
"start": "2017-10-09",
"end": "2017-07-25"
}
}
> *
print COOKIES
10:39:14.784 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:14.787 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:14.787 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DJbu0oN82YXcTtTE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19804/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19804/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:14.787 [print] {
"resourceType": "MedicationAdministration",
"id": "19804",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:17.913+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD03",
"display": "Voclosporina"
}
]
},
"effectivePeriod": {
"start": "2017-10-09",
"end": "2017-07-25"
}
}
> *
print COOKIES
10:39:14.787 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:15.394 [print] {
"resourceType": "MedicationAdministration",
"id": "19804",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:17.913+02:00",
"source": "#DJbu0oN82YXcTtTE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD03",
"display": "Voclosporina"
}
]
},
"effectivePeriod": {
"start": "2017-10-09",
"end": "2017-07-25"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:17.032 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:17.677 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:20.162+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:20.162+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:17.679 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC07",
"display": "Bevacizumab"
}
]
},
"effectivePeriod": {
"start": "2017-11-22",
"end": "2017-10-25"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:18.294 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:18.294 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rLkcMhJ6NsiQFPyT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19805/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19805/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:18.294 [print] {
"resourceType": "MedicationAdministration",
"id": "19805",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:21.419+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC07",
"display": "Bevacizumab"
}
]
},
"effectivePeriod": {
"start": "2017-11-22",
"end": "2017-10-25"
}
}
> *
print COOKIES
10:39:18.294 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:18.296 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:18.296 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rLkcMhJ6NsiQFPyT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19805/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19805/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:18.296 [print] {
"resourceType": "MedicationAdministration",
"id": "19805",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:21.419+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC07",
"display": "Bevacizumab"
}
]
},
"effectivePeriod": {
"start": "2017-11-22",
"end": "2017-10-25"
}
}
> *
print COOKIES
10:39:18.296 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:18.906 [print] {
"resourceType": "MedicationAdministration",
"id": "19805",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:21.419+02:00",
"source": "#rLkcMhJ6NsiQFPyT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC07",
"display": "Bevacizumab"
}
]
},
"effectivePeriod": {
"start": "2017-11-22",
"end": "2017-10-25"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:19.505 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:20.096 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:22.632+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:22.632+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:20.098 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD02",
"display": "Tacrolimus"
}
]
},
"effectivePeriod": {
"start": "2017-11-27",
"end": "2017-11-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:20.708 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:20.708 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"I3DCbx6EF351or3t"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19806/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19806/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:20.708 [print] {
"resourceType": "MedicationAdministration",
"id": "19806",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:23.836+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD02",
"display": "Tacrolimus"
}
]
},
"effectivePeriod": {
"start": "2017-11-27",
"end": "2017-11-27"
}
}
> *
print COOKIES
10:39:20.708 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:20.711 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:20.711 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"I3DCbx6EF351or3t"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19806/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19806/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:20.711 [print] {
"resourceType": "MedicationAdministration",
"id": "19806",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:23.836+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD02",
"display": "Tacrolimus"
}
]
},
"effectivePeriod": {
"start": "2017-11-27",
"end": "2017-11-27"
}
}
> *
print COOKIES
10:39:20.711 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:21.315 [print] {
"resourceType": "MedicationAdministration",
"id": "19806",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:23.836+02:00",
"source": "#I3DCbx6EF351or3t",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AD02",
"display": "Tacrolimus"
}
]
},
"effectivePeriod": {
"start": "2017-11-27",
"end": "2017-11-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:21.956 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:22.585 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:25.061+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:25.061+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:22.587 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC03",
"display": "Anakinra"
}
]
},
"effectivePeriod": {
"start": "2013-01-16",
"end": "2013-03-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:23.180 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:23.180 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Dqrasr1urHVoFe9F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19807/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19807/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:23.180 [print] {
"resourceType": "MedicationAdministration",
"id": "19807",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:26.307+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC03",
"display": "Anakinra"
}
]
},
"effectivePeriod": {
"start": "2013-01-16",
"end": "2013-03-28"
}
}
> *
print COOKIES
10:39:23.180 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:23.182 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:23.182 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Dqrasr1urHVoFe9F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19807/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19807/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:23.182 [print] {
"resourceType": "MedicationAdministration",
"id": "19807",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:26.307+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC03",
"display": "Anakinra"
}
]
},
"effectivePeriod": {
"start": "2013-01-16",
"end": "2013-03-28"
}
}
> *
print COOKIES
10:39:23.182 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:23.802 [print] {
"resourceType": "MedicationAdministration",
"id": "19807",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:26.307+02:00",
"source": "#Dqrasr1urHVoFe9F",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC03",
"display": "Anakinra"
}
]
},
"effectivePeriod": {
"start": "2013-01-16",
"end": "2013-03-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:24.400 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:24.999 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:27.521+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:27.521+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:25.001 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX11",
"display": "Tasonermina"
}
]
},
"effectivePeriod": {
"start": "2013-02-25",
"end": "2013-04-05"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:25.644 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:25.644 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1KWlaOpCQDT6Dlho"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19808/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19808/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:25.644 [print] {
"resourceType": "MedicationAdministration",
"id": "19808",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:28.756+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX11",
"display": "Tasonermina"
}
]
},
"effectivePeriod": {
"start": "2013-02-25",
"end": "2013-04-05"
}
}
> *
print COOKIES
10:39:25.644 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:25.646 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:25.646 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1KWlaOpCQDT6Dlho"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19808/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19808/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:25.646 [print] {
"resourceType": "MedicationAdministration",
"id": "19808",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:28.756+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX11",
"display": "Tasonermina"
}
]
},
"effectivePeriod": {
"start": "2013-02-25",
"end": "2013-04-05"
}
}
> *
print COOKIES
10:39:25.646 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:26.247 [print] {
"resourceType": "MedicationAdministration",
"id": "19808",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:28.756+02:00",
"source": "#1KWlaOpCQDT6Dlho",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX11",
"display": "Tasonermina"
}
]
},
"effectivePeriod": {
"start": "2013-02-25",
"end": "2013-04-05"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:26.883 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:27.513 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:30.012+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:30.012+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:27.515 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD05",
"display": "Temoporfina"
}
]
},
"effectivePeriod": {
"start": "2013-10-14",
"end": "2013-05-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:28.164 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:28.164 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"h3f1zzuCt07jrQ3v"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19809/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19809/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:28.164 [print] {
"resourceType": "MedicationAdministration",
"id": "19809",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:31.283+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD05",
"display": "Temoporfina"
}
]
},
"effectivePeriod": {
"start": "2013-10-14",
"end": "2013-05-30"
}
}
> *
print COOKIES
10:39:28.164 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:28.165 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:28.165 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"h3f1zzuCt07jrQ3v"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19809/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19809/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:28.165 [print] {
"resourceType": "MedicationAdministration",
"id": "19809",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:31.283+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD05",
"display": "Temoporfina"
}
]
},
"effectivePeriod": {
"start": "2013-10-14",
"end": "2013-05-30"
}
}
> *
print COOKIES
10:39:28.165 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:28.784 [print] {
"resourceType": "MedicationAdministration",
"id": "19809",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:31.283+02:00",
"source": "#h3f1zzuCt07jrQ3v",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD05",
"display": "Temoporfina"
}
]
},
"effectivePeriod": {
"start": "2013-10-14",
"end": "2013-05-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:29.403 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:31.011 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:32.510+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:32.510+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:31.013 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX33",
"display": "Celecoxib"
}
]
},
"effectivePeriod": {
"start": "2013-12-04",
"end": "2013-10-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:31.639 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:31.639 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hiuiHV5csxe0utW4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19810/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19810/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:31.639 [print] {
"resourceType": "MedicationAdministration",
"id": "19810",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:34.764+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX33",
"display": "Celecoxib"
}
]
},
"effectivePeriod": {
"start": "2013-12-04",
"end": "2013-10-28"
}
}
> *
print COOKIES
10:39:31.639 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:31.641 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:31.641 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hiuiHV5csxe0utW4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19810/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19810/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:31.641 [print] {
"resourceType": "MedicationAdministration",
"id": "19810",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:34.764+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX33",
"display": "Celecoxib"
}
]
},
"effectivePeriod": {
"start": "2013-12-04",
"end": "2013-10-28"
}
}
> *
print COOKIES
10:39:31.641 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:32.275 [print] {
"resourceType": "MedicationAdministration",
"id": "19810",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:34.764+02:00",
"source": "#hiuiHV5csxe0utW4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX33",
"display": "Celecoxib"
}
]
},
"effectivePeriod": {
"start": "2013-12-04",
"end": "2013-10-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:32.917 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:33.628 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:36.016+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:36.016+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:33.629 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB01",
"display": "Interferone alfa natural"
}
]
},
"effectivePeriod": {
"start": "2014-03-25",
"end": "2014-06-13"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:34.237 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"653"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:34.237 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gPltI9YJHX9hnIlr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19811/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19811/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:34.237 [print] {
"resourceType": "MedicationAdministration",
"id": "19811",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:37.366+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB01",
"display": "Interferone alfa natural"
}
]
},
"effectivePeriod": {
"start": "2014-03-25",
"end": "2014-06-13"
}
}
> *
print COOKIES
10:39:34.237 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:34.239 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"653"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:34.239 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gPltI9YJHX9hnIlr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19811/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19811/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:34.239 [print] {
"resourceType": "MedicationAdministration",
"id": "19811",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:37.366+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB01",
"display": "Interferone alfa natural"
}
]
},
"effectivePeriod": {
"start": "2014-03-25",
"end": "2014-06-13"
}
}
> *
print COOKIES
10:39:34.239 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:34.841 [print] {
"resourceType": "MedicationAdministration",
"id": "19811",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:37.366+02:00",
"source": "#gPltI9YJHX9hnIlr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB01",
"display": "Interferone alfa natural"
}
]
},
"effectivePeriod": {
"start": "2014-03-25",
"end": "2014-06-13"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:35.450 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:36.048 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:38.578+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:38.578+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:36.050 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA10",
"display": "Lenograstim"
}
]
},
"effectivePeriod": {
"start": "2014-06-24",
"end": "2014-07-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:36.648 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:36.648 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yDagxHkyZo5CX1Wi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19812/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19812/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:36.648 [print] {
"resourceType": "MedicationAdministration",
"id": "19812",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:39.774+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA10",
"display": "Lenograstim"
}
]
},
"effectivePeriod": {
"start": "2014-06-24",
"end": "2014-07-11"
}
}
> *
print COOKIES
10:39:36.648 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:36.650 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:36.650 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yDagxHkyZo5CX1Wi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19812/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19812/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:36.650 [print] {
"resourceType": "MedicationAdministration",
"id": "19812",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:39.774+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA10",
"display": "Lenograstim"
}
]
},
"effectivePeriod": {
"start": "2014-06-24",
"end": "2014-07-11"
}
}
> *
print COOKIES
10:39:36.650 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:37.240 [print] {
"resourceType": "MedicationAdministration",
"id": "19812",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:39.774+02:00",
"source": "#yDagxHkyZo5CX1Wi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA10",
"display": "Lenograstim"
}
]
},
"effectivePeriod": {
"start": "2014-06-24",
"end": "2014-07-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:37.847 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:38.449 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:40.978+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:40.978+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:38.451 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA21",
"display": "Efalizumab"
}
]
},
"effectivePeriod": {
"start": "2014-07-16",
"end": "2014-09-25"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:39.068 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:39.068 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"N9pBz7GuM6tEOjSH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19813/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19813/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:39.068 [print] {
"resourceType": "MedicationAdministration",
"id": "19813",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:42.197+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA21",
"display": "Efalizumab"
}
]
},
"effectivePeriod": {
"start": "2014-07-16",
"end": "2014-09-25"
}
}
> *
print COOKIES
10:39:39.068 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:39.070 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:39.070 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"N9pBz7GuM6tEOjSH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19813/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19813/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:39.070 [print] {
"resourceType": "MedicationAdministration",
"id": "19813",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:42.197+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA21",
"display": "Efalizumab"
}
]
},
"effectivePeriod": {
"start": "2014-07-16",
"end": "2014-09-25"
}
}
> *
print COOKIES
10:39:39.070 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:39.670 [print] {
"resourceType": "MedicationAdministration",
"id": "19813",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:42.197+02:00",
"source": "#N9pBz7GuM6tEOjSH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA21",
"display": "Efalizumab"
}
]
},
"effectivePeriod": {
"start": "2014-07-16",
"end": "2014-09-25"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:40.266 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:41.259 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:43.397+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:43.397+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:41.261 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG03",
"display": "Anastrozolo"
}
]
},
"effectivePeriod": {
"start": "2014-08-27",
"end": "2015-01-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:41.869 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:41.869 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"q3LFS1p39v5h8YwK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19814/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19814/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:41.869 [print] {
"resourceType": "MedicationAdministration",
"id": "19814",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:44.998+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG03",
"display": "Anastrozolo"
}
]
},
"effectivePeriod": {
"start": "2014-08-27",
"end": "2015-01-28"
}
}
> *
print COOKIES
10:39:41.869 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:41.871 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:41.871 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"q3LFS1p39v5h8YwK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19814/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19814/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:41.871 [print] {
"resourceType": "MedicationAdministration",
"id": "19814",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:44.998+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG03",
"display": "Anastrozolo"
}
]
},
"effectivePeriod": {
"start": "2014-08-27",
"end": "2015-01-28"
}
}
> *
print COOKIES
10:39:41.871 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:42.513 [print] {
"resourceType": "MedicationAdministration",
"id": "19814",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:44.998+02:00",
"source": "#q3LFS1p39v5h8YwK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BG03",
"display": "Anastrozolo"
}
]
},
"effectivePeriod": {
"start": "2014-08-27",
"end": "2015-01-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:43.159 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:43.767 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:46.265+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:46.265+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:43.769 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA25",
"display": "Eculizumab"
}
]
},
"effectivePeriod": {
"start": "2014-09-11",
"end": "2015-03-31"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:44.398 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:44.398 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qBoLBNf1XHAgB1ne"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19815/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19815/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:44.398 [print] {
"resourceType": "MedicationAdministration",
"id": "19815",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:47.526+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA25",
"display": "Eculizumab"
}
]
},
"effectivePeriod": {
"start": "2014-09-11",
"end": "2015-03-31"
}
}
> *
print COOKIES
10:39:44.398 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:44.400 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:44.401 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qBoLBNf1XHAgB1ne"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19815/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19815/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:44.401 [print] {
"resourceType": "MedicationAdministration",
"id": "19815",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:47.526+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA25",
"display": "Eculizumab"
}
]
},
"effectivePeriod": {
"start": "2014-09-11",
"end": "2015-03-31"
}
}
> *
print COOKIES
10:39:44.401 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:45.008 [print] {
"resourceType": "MedicationAdministration",
"id": "19815",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:47.526+02:00",
"source": "#qBoLBNf1XHAgB1ne",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA25",
"display": "Eculizumab"
}
]
},
"effectivePeriod": {
"start": "2014-09-11",
"end": "2015-03-31"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:45.650 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:46.268 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:48.774+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:48.774+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:46.269 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC08",
"display": "Canakinumab"
}
]
},
"effectivePeriod": {
"start": "2014-09-29",
"end": "2015-04-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:46.869 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:46.869 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"n4qKGXAYMRewQrTp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19816/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19816/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:46.869 [print] {
"resourceType": "MedicationAdministration",
"id": "19816",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:49.995+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC08",
"display": "Canakinumab"
}
]
},
"effectivePeriod": {
"start": "2014-09-29",
"end": "2015-04-17"
}
}
> *
print COOKIES
10:39:46.869 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:46.871 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:46.871 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"n4qKGXAYMRewQrTp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19816/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19816/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:46.871 [print] {
"resourceType": "MedicationAdministration",
"id": "19816",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:49.995+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC08",
"display": "Canakinumab"
}
]
},
"effectivePeriod": {
"start": "2014-09-29",
"end": "2015-04-17"
}
}
> *
print COOKIES
10:39:46.871 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:47.465 [print] {
"resourceType": "MedicationAdministration",
"id": "19816",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:49.995+02:00",
"source": "#n4qKGXAYMRewQrTp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC08",
"display": "Canakinumab"
}
]
},
"effectivePeriod": {
"start": "2014-09-29",
"end": "2015-04-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:48.080 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:48.686 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:51.208+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:51.208+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:48.687 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC04",
"display": "Alemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-12-10",
"end": "2015-06-09"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:49.279 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:49.279 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Dr2gvCedduo7I745"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19817/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19817/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:49.279 [print] {
"resourceType": "MedicationAdministration",
"id": "19817",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:52.410+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC04",
"display": "Alemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-12-10",
"end": "2015-06-09"
}
}
> *
print COOKIES
10:39:49.279 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:49.280 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:49.280 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Dr2gvCedduo7I745"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19817/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19817/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:49.281 [print] {
"resourceType": "MedicationAdministration",
"id": "19817",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:52.410+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC04",
"display": "Alemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-12-10",
"end": "2015-06-09"
}
}
> *
print COOKIES
10:39:49.281 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:49.877 [print] {
"resourceType": "MedicationAdministration",
"id": "19817",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:52.410+02:00",
"source": "#Dr2gvCedduo7I745",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC04",
"display": "Alemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-12-10",
"end": "2015-06-09"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:50.522 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 17ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 17ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:51.119 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:53.642+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:53.642+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:51.120 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD05",
"display": "Fotemustina"
}
]
},
"effectivePeriod": {
"start": "2014-12-17",
"end": "2015-08-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:51.815 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:51.815 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UN7myB1wsNtUyxmg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19818/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19818/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:51.815 [print] {
"resourceType": "MedicationAdministration",
"id": "19818",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:54.940+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD05",
"display": "Fotemustina"
}
]
},
"effectivePeriod": {
"start": "2014-12-17",
"end": "2015-08-17"
}
}
> *
print COOKIES
10:39:51.815 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:51.817 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:51.817 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UN7myB1wsNtUyxmg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19818/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19818/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:51.817 [print] {
"resourceType": "MedicationAdministration",
"id": "19818",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:54.940+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD05",
"display": "Fotemustina"
}
]
},
"effectivePeriod": {
"start": "2014-12-17",
"end": "2015-08-17"
}
}
> *
print COOKIES
10:39:51.817 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:52.404 [print] {
"resourceType": "MedicationAdministration",
"id": "19818",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:54.940+02:00",
"source": "#UN7myB1wsNtUyxmg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD05",
"display": "Fotemustina"
}
]
},
"effectivePeriod": {
"start": "2014-12-17",
"end": "2015-08-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:53.035 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:53.629 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:56.166+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:56.166+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:53.630 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD02",
"display": "Docetaxel"
}
]
},
"effectivePeriod": {
"start": "2015-01-07",
"end": "2015-10-08"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:54.263 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:54.263 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"49G0OyfNOcWZJ1XP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19819/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19819/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:54.263 [print] {
"resourceType": "MedicationAdministration",
"id": "19819",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:57.376+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD02",
"display": "Docetaxel"
}
]
},
"effectivePeriod": {
"start": "2015-01-07",
"end": "2015-10-08"
}
}
> *
print COOKIES
10:39:54.263 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:54.265 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:54.265 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"49G0OyfNOcWZJ1XP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19819/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:39:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19819/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:54.265 [print] {
"resourceType": "MedicationAdministration",
"id": "19819",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:57.376+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD02",
"display": "Docetaxel"
}
]
},
"effectivePeriod": {
"start": "2015-01-07",
"end": "2015-10-08"
}
}
> *
print COOKIES
10:39:54.265 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:55.087 [print] {
"resourceType": "MedicationAdministration",
"id": "19819",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:39:57.376+02:00",
"source": "#49G0OyfNOcWZJ1XP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD02",
"display": "Docetaxel"
}
]
},
"effectivePeriod": {
"start": "2015-01-07",
"end": "2015-10-08"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:55.724 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:56.337 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:39:58.838+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:39:58.838+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:56.338 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX14",
"display": "Tretinoin"
}
]
},
"effectivePeriod": {
"start": "2015-03-09",
"end": "2016-02-15"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:56.956 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:56.956 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MMN0q4i4NQ4kgp2E"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19820/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19820/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:56.956 [print] {
"resourceType": "MedicationAdministration",
"id": "19820",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:00.084+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX14",
"display": "Tretinoin"
}
]
},
"effectivePeriod": {
"start": "2015-03-09",
"end": "2016-02-15"
}
}
> *
print COOKIES
10:39:56.956 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:56.958 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:56.958 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MMN0q4i4NQ4kgp2E"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19820/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19820/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:39:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:56.958 [print] {
"resourceType": "MedicationAdministration",
"id": "19820",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:00.084+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX14",
"display": "Tretinoin"
}
]
},
"effectivePeriod": {
"start": "2015-03-09",
"end": "2016-02-15"
}
}
> *
print COOKIES
10:39:56.958 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:39:57.578 [print] {
"resourceType": "MedicationAdministration",
"id": "19820",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:00.084+02:00",
"source": "#MMN0q4i4NQ4kgp2E",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX14",
"display": "Tretinoin"
}
]
},
"effectivePeriod": {
"start": "2015-03-09",
"end": "2016-02-15"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:39:58.223 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:39:58.844 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:01.341+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:01.341+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:39:58.845 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC04",
"display": "Ixabepilone"
}
]
},
"effectivePeriod": {
"start": "2015-03-30",
"end": "2016-06-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:59.473 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:59.473 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nQBQDQHZuznYvlCD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19821/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19821/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:59.473 [print] {
"resourceType": "MedicationAdministration",
"id": "19821",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:02.593+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC04",
"display": "Ixabepilone"
}
]
},
"effectivePeriod": {
"start": "2015-03-30",
"end": "2016-06-17"
}
}
> *
print COOKIES
10:39:59.473 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:39:59.475 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:39:59.475 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nQBQDQHZuznYvlCD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19821/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19821/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:39:59.475 [print] {
"resourceType": "MedicationAdministration",
"id": "19821",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:02.593+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC04",
"display": "Ixabepilone"
}
]
},
"effectivePeriod": {
"start": "2015-03-30",
"end": "2016-06-17"
}
}
> *
print COOKIES
10:39:59.475 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:00.089 [print] {
"resourceType": "MedicationAdministration",
"id": "19821",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:02.593+02:00",
"source": "#nQBQDQHZuznYvlCD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC04",
"display": "Ixabepilone"
}
]
},
"effectivePeriod": {
"start": "2015-03-30",
"end": "2016-06-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:00.709 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:01.323 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:03.839+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:03.839+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:01.325 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX02",
"display": "Pipobromam"
}
]
},
"effectivePeriod": {
"start": "2015-12-11",
"end": "2016-06-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:01.951 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:01.951 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tMOd4XBRd5T1xFTD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19822/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19822/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:01.951 [print] {
"resourceType": "MedicationAdministration",
"id": "19822",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:05.075+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX02",
"display": "Pipobromam"
}
]
},
"effectivePeriod": {
"start": "2015-12-11",
"end": "2016-06-28"
}
}
> *
print COOKIES
10:40:01.951 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:01.953 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:01.953 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tMOd4XBRd5T1xFTD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19822/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19822/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:01.953 [print] {
"resourceType": "MedicationAdministration",
"id": "19822",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:05.075+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX02",
"display": "Pipobromam"
}
]
},
"effectivePeriod": {
"start": "2015-12-11",
"end": "2016-06-28"
}
}
> *
print COOKIES
10:40:01.953 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:02.611 [print] {
"resourceType": "MedicationAdministration",
"id": "19822",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:05.075+02:00",
"source": "#tMOd4XBRd5T1xFTD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AX02",
"display": "Pipobromam"
}
]
},
"effectivePeriod": {
"start": "2015-12-11",
"end": "2016-06-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:03.250 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:03.899 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:06.380+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:06.380+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:03.900 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE23",
"display": "Dabrafenib"
}
]
},
"effectivePeriod": {
"start": "2016-03-31",
"end": "2016-07-18"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:04.519 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:04.519 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rXYi3xbnnltt0QtI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19823/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19823/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:04.519 [print] {
"resourceType": "MedicationAdministration",
"id": "19823",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:07.649+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE23",
"display": "Dabrafenib"
}
]
},
"effectivePeriod": {
"start": "2016-03-31",
"end": "2016-07-18"
}
}
> *
print COOKIES
10:40:04.519 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:04.520 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:04.520 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rXYi3xbnnltt0QtI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19823/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19823/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:04.520 [print] {
"resourceType": "MedicationAdministration",
"id": "19823",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:07.649+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE23",
"display": "Dabrafenib"
}
]
},
"effectivePeriod": {
"start": "2016-03-31",
"end": "2016-07-18"
}
}
> *
print COOKIES
10:40:04.520 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:05.149 [print] {
"resourceType": "MedicationAdministration",
"id": "19823",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:07.649+02:00",
"source": "#rXYi3xbnnltt0QtI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE23",
"display": "Dabrafenib"
}
]
},
"effectivePeriod": {
"start": "2016-03-31",
"end": "2016-07-18"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:05.757 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:06.399 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:08.887+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:08.887+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:06.400 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX16",
"display": "Mitoguazone"
}
]
},
"effectivePeriod": {
"start": "2016-05-20",
"end": "2016-08-31"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:07.015 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:07.015 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4bUoGNYjy5XphX8I"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19824/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19824/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:07.015 [print] {
"resourceType": "MedicationAdministration",
"id": "19824",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:10.136+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX16",
"display": "Mitoguazone"
}
]
},
"effectivePeriod": {
"start": "2016-05-20",
"end": "2016-08-31"
}
}
> *
print COOKIES
10:40:07.015 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:07.016 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:07.016 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4bUoGNYjy5XphX8I"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19824/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19824/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:07.016 [print] {
"resourceType": "MedicationAdministration",
"id": "19824",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:10.136+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX16",
"display": "Mitoguazone"
}
]
},
"effectivePeriod": {
"start": "2016-05-20",
"end": "2016-08-31"
}
}
> *
print COOKIES
10:40:07.017 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:07.621 [print] {
"resourceType": "MedicationAdministration",
"id": "19824",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:10.136+02:00",
"source": "#4bUoGNYjy5XphX8I",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX16",
"display": "Mitoguazone"
}
]
},
"effectivePeriod": {
"start": "2016-05-20",
"end": "2016-08-31"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:08.254 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:08.883 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:11.383+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:11.383+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:08.884 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC13",
"display": "Pertuzumab"
}
]
},
"effectivePeriod": {
"start": "2016-07-29",
"end": "2016-09-06"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:09.494 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:09.494 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JoltNL9qk4BnXWl2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19825/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19825/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:09.494 [print] {
"resourceType": "MedicationAdministration",
"id": "19825",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:12.619+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC13",
"display": "Pertuzumab"
}
]
},
"effectivePeriod": {
"start": "2016-07-29",
"end": "2016-09-06"
}
}
> *
print COOKIES
10:40:09.494 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:09.496 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:09.496 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JoltNL9qk4BnXWl2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19825/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19825/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:09.496 [print] {
"resourceType": "MedicationAdministration",
"id": "19825",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:12.619+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC13",
"display": "Pertuzumab"
}
]
},
"effectivePeriod": {
"start": "2016-07-29",
"end": "2016-09-06"
}
}
> *
print COOKIES
10:40:09.496 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:10.092 [print] {
"resourceType": "MedicationAdministration",
"id": "19825",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:12.619+02:00",
"source": "#JoltNL9qk4BnXWl2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC13",
"display": "Pertuzumab"
}
]
},
"effectivePeriod": {
"start": "2016-07-29",
"end": "2016-09-06"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:10.723 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:11.347 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:13.849+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:13.849+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:11.347 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AC01",
"display": "Aldesleuchina"
}
]
},
"effectivePeriod": {
"start": "2016-08-03",
"end": "2016-10-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:11.952 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:11.952 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NuI1HnEQOXd4fVNo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19826/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19826/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:11.952 [print] {
"resourceType": "MedicationAdministration",
"id": "19826",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:15.081+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AC01",
"display": "Aldesleuchina"
}
]
},
"effectivePeriod": {
"start": "2016-08-03",
"end": "2016-10-26"
}
}
> *
print COOKIES
10:40:11.952 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:11.953 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:11.953 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NuI1HnEQOXd4fVNo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19826/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19826/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:11.953 [print] {
"resourceType": "MedicationAdministration",
"id": "19826",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:15.081+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AC01",
"display": "Aldesleuchina"
}
]
},
"effectivePeriod": {
"start": "2016-08-03",
"end": "2016-10-26"
}
}
> *
print COOKIES
10:40:11.953 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:12.573 [print] {
"resourceType": "MedicationAdministration",
"id": "19826",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:15.081+02:00",
"source": "#NuI1HnEQOXd4fVNo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AC01",
"display": "Aldesleuchina"
}
]
},
"effectivePeriod": {
"start": "2016-08-03",
"end": "2016-10-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:13.218 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:13.836 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:16.338+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:16.338+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:13.837 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE04",
"display": "Triptorelina "
}
]
},
"effectivePeriod": {
"start": "2016-10-13",
"end": "2016-12-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:14.465 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:14.465 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"e2df4kIbCixGqZIu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19827/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19827/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:14.465 [print] {
"resourceType": "MedicationAdministration",
"id": "19827",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:17.594+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE04",
"display": "Triptorelina "
}
]
},
"effectivePeriod": {
"start": "2016-10-13",
"end": "2016-12-27"
}
}
> *
print COOKIES
10:40:14.465 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:14.467 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:14.467 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"e2df4kIbCixGqZIu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19827/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19827/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:14.467 [print] {
"resourceType": "MedicationAdministration",
"id": "19827",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:17.594+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE04",
"display": "Triptorelina "
}
]
},
"effectivePeriod": {
"start": "2016-10-13",
"end": "2016-12-27"
}
}
> *
print COOKIES
10:40:14.467 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:15.076 [print] {
"resourceType": "MedicationAdministration",
"id": "19827",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:17.594+02:00",
"source": "#e2df4kIbCixGqZIu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AE04",
"display": "Triptorelina "
}
]
},
"effectivePeriod": {
"start": "2016-10-13",
"end": "2016-12-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:15.769 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:16.367 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:18.897+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:18.897+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:16.368 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA27",
"display": "Fingolimod "
}
]
},
"effectivePeriod": {
"start": "2017-01-09",
"end": "2017-01-18"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:16.995 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:16.995 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2CIiEhgy1r5R8C3T"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19828/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19828/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:16.995 [print] {
"resourceType": "MedicationAdministration",
"id": "19828",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:20.111+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA27",
"display": "Fingolimod "
}
]
},
"effectivePeriod": {
"start": "2017-01-09",
"end": "2017-01-18"
}
}
> *
print COOKIES
10:40:16.995 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:16.997 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:16.997 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2CIiEhgy1r5R8C3T"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19828/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19828/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:16.997 [print] {
"resourceType": "MedicationAdministration",
"id": "19828",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:20.111+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA27",
"display": "Fingolimod "
}
]
},
"effectivePeriod": {
"start": "2017-01-09",
"end": "2017-01-18"
}
}
> *
print COOKIES
10:40:16.997 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:17.607 [print] {
"resourceType": "MedicationAdministration",
"id": "19828",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:20.111+02:00",
"source": "#2CIiEhgy1r5R8C3T",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA27",
"display": "Fingolimod "
}
]
},
"effectivePeriod": {
"start": "2017-01-09",
"end": "2017-01-18"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:18.221 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:18.855 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:21.347+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:21.347+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:18.856 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX12",
"display": "Melanoma vaccino"
}
]
},
"effectivePeriod": {
"start": "2017-01-24",
"end": "2017-03-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:19.463 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"645"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:19.463 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"f2ihdXBjjAkha2GC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19829/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19829/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:19.463 [print] {
"resourceType": "MedicationAdministration",
"id": "19829",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:22.593+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX12",
"display": "Melanoma vaccino"
}
]
},
"effectivePeriod": {
"start": "2017-01-24",
"end": "2017-03-30"
}
}
> *
print COOKIES
10:40:19.463 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:19.464 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"645"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:19.464 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"f2ihdXBjjAkha2GC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19829/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19829/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:19.464 [print] {
"resourceType": "MedicationAdministration",
"id": "19829",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:22.593+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX12",
"display": "Melanoma vaccino"
}
]
},
"effectivePeriod": {
"start": "2017-01-24",
"end": "2017-03-30"
}
}
> *
print COOKIES
10:40:19.464 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:20.059 [print] {
"resourceType": "MedicationAdministration",
"id": "19829",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:22.593+02:00",
"source": "#f2ihdXBjjAkha2GC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX12",
"display": "Melanoma vaccino"
}
]
},
"effectivePeriod": {
"start": "2017-01-24",
"end": "2017-03-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:20.673 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:21.267 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:23.803+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:23.803+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:21.268 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA02",
"display": "Toremifene "
}
]
},
"effectivePeriod": {
"start": "2017-06-08",
"end": "2017-10-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:21.888 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:21.888 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nY2arejKswHn9ksN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19830/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19830/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:21.888 [print] {
"resourceType": "MedicationAdministration",
"id": "19830",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:25.017+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA02",
"display": "Toremifene "
}
]
},
"effectivePeriod": {
"start": "2017-06-08",
"end": "2017-10-11"
}
}
> *
print COOKIES
10:40:21.888 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:21.889 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:21.889 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nY2arejKswHn9ksN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19830/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19830/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:21.889 [print] {
"resourceType": "MedicationAdministration",
"id": "19830",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:25.017+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA02",
"display": "Toremifene "
}
]
},
"effectivePeriod": {
"start": "2017-06-08",
"end": "2017-10-11"
}
}
> *
print COOKIES
10:40:21.889 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:22.706 [print] {
"resourceType": "MedicationAdministration",
"id": "19830",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:25.017+02:00",
"source": "#nY2arejKswHn9ksN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA02",
"display": "Toremifene "
}
]
},
"effectivePeriod": {
"start": "2017-06-08",
"end": "2017-10-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:23.342 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:23.958 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:26.449+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:26.449+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:23.959 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE27",
"display": "Ibrutinib"
}
]
},
"effectivePeriod": {
"start": "2017-07-19",
"end": "2017-12-01"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:24.561 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:24.561 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"saupeyKHb6ye9i9W"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19831/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19831/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:24.561 [print] {
"resourceType": "MedicationAdministration",
"id": "19831",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:27.693+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE27",
"display": "Ibrutinib"
}
]
},
"effectivePeriod": {
"start": "2017-07-19",
"end": "2017-12-01"
}
}
> *
print COOKIES
10:40:24.561 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:24.563 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:24.563 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"saupeyKHb6ye9i9W"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19831/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19831/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:24.563 [print] {
"resourceType": "MedicationAdministration",
"id": "19831",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:27.693+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE27",
"display": "Ibrutinib"
}
]
},
"effectivePeriod": {
"start": "2017-07-19",
"end": "2017-12-01"
}
}
> *
print COOKIES
10:40:24.563 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:25.167 [print] {
"resourceType": "MedicationAdministration",
"id": "19831",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:27.693+02:00",
"source": "#saupeyKHb6ye9i9W",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE27",
"display": "Ibrutinib"
}
]
},
"effectivePeriod": {
"start": "2017-07-19",
"end": "2017-12-01"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:25.787 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:26.416 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:28.916+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:28.916+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:26.417 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC02",
"display": "Plicamicina"
}
]
},
"effectivePeriod": {
"start": "2012-09-13",
"end": "2013-03-14"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:27.010 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:27.010 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UMA96cB8kQOtU1Ne"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19832/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19832/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:27.010 [print] {
"resourceType": "MedicationAdministration",
"id": "19832",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:30.140+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC02",
"display": "Plicamicina"
}
]
},
"effectivePeriod": {
"start": "2012-09-13",
"end": "2013-03-14"
}
}
> *
print COOKIES
10:40:27.010 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:27.011 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:27.011 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UMA96cB8kQOtU1Ne"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19832/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19832/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:27.011 [print] {
"resourceType": "MedicationAdministration",
"id": "19832",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:30.140+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC02",
"display": "Plicamicina"
}
]
},
"effectivePeriod": {
"start": "2012-09-13",
"end": "2013-03-14"
}
}
> *
print COOKIES
10:40:27.011 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:27.619 [print] {
"resourceType": "MedicationAdministration",
"id": "19832",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:30.140+02:00",
"source": "#UMA96cB8kQOtU1Ne",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC02",
"display": "Plicamicina"
}
]
},
"effectivePeriod": {
"start": "2012-09-13",
"end": "2013-03-14"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:28.228 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:28.884 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:31.356+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:31.356+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:28.885 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD03",
"display": "Paclitaxel poliglumex"
}
]
},
"effectivePeriod": {
"start": "2012-09-27",
"end": "2013-04-24"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:29.494 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"650"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:29.494 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DBKauSj4Jvz9QN4F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19833/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19833/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:29.494 [print] {
"resourceType": "MedicationAdministration",
"id": "19833",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:32.623+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD03",
"display": "Paclitaxel poliglumex"
}
]
},
"effectivePeriod": {
"start": "2012-09-27",
"end": "2013-04-24"
}
}
> *
print COOKIES
10:40:29.494 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:29.496 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"650"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:29.496 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DBKauSj4Jvz9QN4F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19833/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19833/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:29.496 [print] {
"resourceType": "MedicationAdministration",
"id": "19833",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:32.623+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD03",
"display": "Paclitaxel poliglumex"
}
]
},
"effectivePeriod": {
"start": "2012-09-27",
"end": "2013-04-24"
}
}
> *
print COOKIES
10:40:29.496 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:30.105 [print] {
"resourceType": "MedicationAdministration",
"id": "19833",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:32.623+02:00",
"source": "#DBKauSj4Jvz9QN4F",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD03",
"display": "Paclitaxel poliglumex"
}
]
},
"effectivePeriod": {
"start": "2012-09-27",
"end": "2013-04-24"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:31.094 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:31.724 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:34.226+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:34.226+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:31.725 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA02",
"display": "Clorambucile"
}
]
},
"effectivePeriod": {
"start": "2012-12-27",
"end": "2013-05-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:32.350 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:32.350 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5AqsbKUX3HgcwYfD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19834/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19834/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:32.350 [print] {
"resourceType": "MedicationAdministration",
"id": "19834",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:35.481+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA02",
"display": "Clorambucile"
}
]
},
"effectivePeriod": {
"start": "2012-12-27",
"end": "2013-05-16"
}
}
> *
print COOKIES
10:40:32.350 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:32.352 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:32.352 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5AqsbKUX3HgcwYfD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19834/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19834/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:32.352 [print] {
"resourceType": "MedicationAdministration",
"id": "19834",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:35.481+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA02",
"display": "Clorambucile"
}
]
},
"effectivePeriod": {
"start": "2012-12-27",
"end": "2013-05-16"
}
}
> *
print COOKIES
10:40:32.352 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:32.952 [print] {
"resourceType": "MedicationAdministration",
"id": "19834",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:35.481+02:00",
"source": "#5AqsbKUX3HgcwYfD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA02",
"display": "Clorambucile"
}
]
},
"effectivePeriod": {
"start": "2012-12-27",
"end": "2013-05-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:33.573 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:34.174 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:36.705+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:36.705+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:34.174 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE33",
"display": "Palbociclib"
}
]
},
"effectivePeriod": {
"start": "2013-01-17",
"end": "2013-09-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:35.163 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:35.163 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6BMBgxmBIaf1toq3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19835/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19835/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:35.163 [print] {
"resourceType": "MedicationAdministration",
"id": "19835",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:38.285+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE33",
"display": "Palbociclib"
}
]
},
"effectivePeriod": {
"start": "2013-01-17",
"end": "2013-09-16"
}
}
> *
print COOKIES
10:40:35.163 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:35.164 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:35.164 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6BMBgxmBIaf1toq3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19835/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19835/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:35.164 [print] {
"resourceType": "MedicationAdministration",
"id": "19835",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:38.285+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE33",
"display": "Palbociclib"
}
]
},
"effectivePeriod": {
"start": "2013-01-17",
"end": "2013-09-16"
}
}
> *
print COOKIES
10:40:35.164 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:35.746 [print] {
"resourceType": "MedicationAdministration",
"id": "19835",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:38.285+02:00",
"source": "#6BMBgxmBIaf1toq3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE33",
"display": "Palbociclib"
}
]
},
"effectivePeriod": {
"start": "2013-01-17",
"end": "2013-09-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:36.355 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:36.952 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:39.480+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:39.480+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:36.953 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX01",
"display": "Amsacrina"
}
]
},
"effectivePeriod": {
"start": "2013-03-18",
"end": "2013-10-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:37.657 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:37.657 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MmVFczADGVazj4yf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19836/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19836/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:37.657 [print] {
"resourceType": "MedicationAdministration",
"id": "19836",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:40.786+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX01",
"display": "Amsacrina"
}
]
},
"effectivePeriod": {
"start": "2013-03-18",
"end": "2013-10-28"
}
}
> *
print COOKIES
10:40:37.657 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:37.658 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:37.658 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MmVFczADGVazj4yf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19836/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19836/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:37.658 [print] {
"resourceType": "MedicationAdministration",
"id": "19836",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:40.786+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX01",
"display": "Amsacrina"
}
]
},
"effectivePeriod": {
"start": "2013-03-18",
"end": "2013-10-28"
}
}
> *
print COOKIES
10:40:37.658 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:38.266 [print] {
"resourceType": "MedicationAdministration",
"id": "19836",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:40.786+02:00",
"source": "#MmVFczADGVazj4yf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX01",
"display": "Amsacrina"
}
]
},
"effectivePeriod": {
"start": "2013-03-18",
"end": "2013-10-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:38.901 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:39.500 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:42.012+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:42.012+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:39.501 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX02",
"display": "Talidomida"
}
]
},
"effectivePeriod": {
"start": "2013-04-09",
"end": "2014-02-05"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:40.089 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:40.089 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HpQOiIck9HPiIA3a"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19837/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19837/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:40.089 [print] {
"resourceType": "MedicationAdministration",
"id": "19837",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:43.221+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX02",
"display": "Talidomida"
}
]
},
"effectivePeriod": {
"start": "2013-04-09",
"end": "2014-02-05"
}
}
> *
print COOKIES
10:40:40.089 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:40.090 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:40.091 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HpQOiIck9HPiIA3a"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19837/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19837/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:40.091 [print] {
"resourceType": "MedicationAdministration",
"id": "19837",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:43.221+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX02",
"display": "Talidomida"
}
]
},
"effectivePeriod": {
"start": "2013-04-09",
"end": "2014-02-05"
}
}
> *
print COOKIES
10:40:40.091 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:40.792 [print] {
"resourceType": "MedicationAdministration",
"id": "19837",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:43.221+02:00",
"source": "#HpQOiIck9HPiIA3a",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX02",
"display": "Talidomida"
}
]
},
"effectivePeriod": {
"start": "2013-04-09",
"end": "2014-02-05"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:41.436 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:42.035 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:44.545+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:44.545+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:42.036 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD06",
"display": "Nimustina"
}
]
},
"effectivePeriod": {
"start": "2013-07-19",
"end": "2014-04-24"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:42.658 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:42.658 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EocEGXsTH0iq24lP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19838/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19838/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:42.658 [print] {
"resourceType": "MedicationAdministration",
"id": "19838",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:45.788+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD06",
"display": "Nimustina"
}
]
},
"effectivePeriod": {
"start": "2013-07-19",
"end": "2014-04-24"
}
}
> *
print COOKIES
10:40:42.658 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:42.659 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:42.659 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EocEGXsTH0iq24lP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19838/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19838/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:42.659 [print] {
"resourceType": "MedicationAdministration",
"id": "19838",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:45.788+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD06",
"display": "Nimustina"
}
]
},
"effectivePeriod": {
"start": "2013-07-19",
"end": "2014-04-24"
}
}
> *
print COOKIES
10:40:42.659 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:43.257 [print] {
"resourceType": "MedicationAdministration",
"id": "19838",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:45.788+02:00",
"source": "#EocEGXsTH0iq24lP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AD06",
"display": "Nimustina"
}
]
},
"effectivePeriod": {
"start": "2013-07-19",
"end": "2014-04-24"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:43.871 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:44.467 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:46.995+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:46.995+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:44.467 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB05",
"display": "Certolizumab"
}
]
},
"effectivePeriod": {
"start": "2013-09-09",
"end": "2014-06-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:45.081 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:45.081 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"N5vAdaw5zwlrGdGT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19839/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19839/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:45.081 [print] {
"resourceType": "MedicationAdministration",
"id": "19839",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:48.206+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB05",
"display": "Certolizumab"
}
]
},
"effectivePeriod": {
"start": "2013-09-09",
"end": "2014-06-16"
}
}
> *
print COOKIES
10:40:45.081 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:45.083 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:45.083 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"N5vAdaw5zwlrGdGT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19839/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19839/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:45.083 [print] {
"resourceType": "MedicationAdministration",
"id": "19839",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:48.206+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB05",
"display": "Certolizumab"
}
]
},
"effectivePeriod": {
"start": "2013-09-09",
"end": "2014-06-16"
}
}
> *
print COOKIES
10:40:45.083 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:45.673 [print] {
"resourceType": "MedicationAdministration",
"id": "19839",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:48.206+02:00",
"source": "#N5vAdaw5zwlrGdGT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB05",
"display": "Certolizumab"
}
]
},
"effectivePeriod": {
"start": "2013-09-09",
"end": "2014-06-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:46.306 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:46.922 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:49.434+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:49.434+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:46.923 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA04",
"display": "Immunoglobulina di coniglio antitimocitaria"
}
]
},
"effectivePeriod": {
"start": "2013-12-11",
"end": "2014-07-02"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:47.550 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"672"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:47.550 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eZGev8yETarKr5Uc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19840/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19840/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:47.550 [print] {
"resourceType": "MedicationAdministration",
"id": "19840",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:50.678+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA04",
"display": "Immunoglobulina di coniglio antitimocitaria"
}
]
},
"effectivePeriod": {
"start": "2013-12-11",
"end": "2014-07-02"
}
}
> *
print COOKIES
10:40:47.550 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:47.551 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"672"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:47.551 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eZGev8yETarKr5Uc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19840/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19840/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:47.551 [print] {
"resourceType": "MedicationAdministration",
"id": "19840",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:50.678+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA04",
"display": "Immunoglobulina di coniglio antitimocitaria"
}
]
},
"effectivePeriod": {
"start": "2013-12-11",
"end": "2014-07-02"
}
}
> *
print COOKIES
10:40:47.551 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:48.185 [print] {
"resourceType": "MedicationAdministration",
"id": "19840",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:50.678+02:00",
"source": "#eZGev8yETarKr5Uc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA04",
"display": "Immunoglobulina di coniglio antitimocitaria"
}
]
},
"effectivePeriod": {
"start": "2013-12-11",
"end": "2014-07-02"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:48.808 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:49.414 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:51.938+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:51.938+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:49.415 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC15",
"display": "Obinutuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-02-07",
"end": "2014-11-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:50.004 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:50.004 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ss3o5GywEYSeArrg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19841/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19841/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:50.004 [print] {
"resourceType": "MedicationAdministration",
"id": "19841",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:53.129+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC15",
"display": "Obinutuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-02-07",
"end": "2014-11-17"
}
}
> *
print COOKIES
10:40:50.004 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:50.005 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:50.005 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ss3o5GywEYSeArrg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19841/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19841/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:50.005 [print] {
"resourceType": "MedicationAdministration",
"id": "19841",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:53.129+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC15",
"display": "Obinutuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-02-07",
"end": "2014-11-17"
}
}
> *
print COOKIES
10:40:50.005 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:50.605 [print] {
"resourceType": "MedicationAdministration",
"id": "19841",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:53.129+02:00",
"source": "#Ss3o5GywEYSeArrg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC15",
"display": "Obinutuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-02-07",
"end": "2014-11-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:51.231 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:51.841 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:54.352+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:54.352+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:51.842 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE12",
"display": "Vandetanib"
}
]
},
"effectivePeriod": {
"start": "2014-03-03",
"end": "2015-01-05"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:52.482 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:52.482 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bvTeELKmWipcUBiy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19842/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19842/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:52.482 [print] {
"resourceType": "MedicationAdministration",
"id": "19842",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:55.591+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE12",
"display": "Vandetanib"
}
]
},
"effectivePeriod": {
"start": "2014-03-03",
"end": "2015-01-05"
}
}
> *
print COOKIES
10:40:52.482 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:52.483 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:52.484 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bvTeELKmWipcUBiy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19842/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19842/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:52.484 [print] {
"resourceType": "MedicationAdministration",
"id": "19842",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:55.591+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE12",
"display": "Vandetanib"
}
]
},
"effectivePeriod": {
"start": "2014-03-03",
"end": "2015-01-05"
}
}
> *
print COOKIES
10:40:52.484 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:53.097 [print] {
"resourceType": "MedicationAdministration",
"id": "19842",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:55.591+02:00",
"source": "#bvTeELKmWipcUBiy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE12",
"display": "Vandetanib"
}
]
},
"effectivePeriod": {
"start": "2014-03-03",
"end": "2015-01-05"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:53.721 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:54.322 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:56.852+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:56.852+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:54.324 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA09",
"display": "Sargramostim"
}
]
},
"effectivePeriod": {
"start": "2014-03-04",
"end": "2015-01-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:54.922 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:54.922 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VYW7V3W9axyqMZtX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19843/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19843/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:54.922 [print] {
"resourceType": "MedicationAdministration",
"id": "19843",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:58.050+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA09",
"display": "Sargramostim"
}
]
},
"effectivePeriod": {
"start": "2014-03-04",
"end": "2015-01-28"
}
}
> *
print COOKIES
10:40:54.922 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:54.924 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:54.924 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VYW7V3W9axyqMZtX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19843/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:40:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19843/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:54.924 [print] {
"resourceType": "MedicationAdministration",
"id": "19843",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:58.050+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA09",
"display": "Sargramostim"
}
]
},
"effectivePeriod": {
"start": "2014-03-04",
"end": "2015-01-28"
}
}
> *
print COOKIES
10:40:54.924 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:55.552 [print] {
"resourceType": "MedicationAdministration",
"id": "19843",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:40:58.050+02:00",
"source": "#VYW7V3W9axyqMZtX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA09",
"display": "Sargramostim"
}
]
},
"effectivePeriod": {
"start": "2014-03-04",
"end": "2015-01-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:56.175 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:56.786 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:40:59.285+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:40:59.285+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:56.787 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA01",
"display": "Ciclofosfamide"
}
]
},
"effectivePeriod": {
"start": "2014-03-14",
"end": "2015-02-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:57.436 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:57.436 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lUlMVlJiNs56t2vd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19844/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19844/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:57.436 [print] {
"resourceType": "MedicationAdministration",
"id": "19844",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:00.568+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA01",
"display": "Ciclofosfamide"
}
]
},
"effectivePeriod": {
"start": "2014-03-14",
"end": "2015-02-27"
}
}
> *
print COOKIES
10:40:57.436 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:57.437 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:57.437 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lUlMVlJiNs56t2vd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19844/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19844/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:40:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:57.437 [print] {
"resourceType": "MedicationAdministration",
"id": "19844",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:00.568+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA01",
"display": "Ciclofosfamide"
}
]
},
"effectivePeriod": {
"start": "2014-03-14",
"end": "2015-02-27"
}
}
> *
print COOKIES
10:40:57.437 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:58.062 [print] {
"resourceType": "MedicationAdministration",
"id": "19844",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:00.568+02:00",
"source": "#lUlMVlJiNs56t2vd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA01",
"display": "Ciclofosfamide"
}
]
},
"effectivePeriod": {
"start": "2014-03-14",
"end": "2015-02-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:58.688 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:59.291 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:01.817+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:01.817+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:40:59.292 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC23",
"display": "Elotuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-04-22",
"end": "2015-05-14"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:59.900 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:59.900 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QDo3ot1vqbtU8mg1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19845/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19845/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:59.900 [print] {
"resourceType": "MedicationAdministration",
"id": "19845",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:03.031+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC23",
"display": "Elotuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-04-22",
"end": "2015-05-14"
}
}
> *
print COOKIES
10:40:59.900 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:59.902 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:59.902 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QDo3ot1vqbtU8mg1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19845/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19845/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:59.902 [print] {
"resourceType": "MedicationAdministration",
"id": "19845",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:03.031+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC23",
"display": "Elotuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-04-22",
"end": "2015-05-14"
}
}
> *
print COOKIES
10:40:59.902 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:00.602 [print] {
"resourceType": "MedicationAdministration",
"id": "19845",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:03.031+02:00",
"source": "#QDo3ot1vqbtU8mg1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC23",
"display": "Elotuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-04-22",
"end": "2015-05-14"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:01.226 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:01.828 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:04.358+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:04.358+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:01.831 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX03",
"display": "Altretamina"
}
]
},
"effectivePeriod": {
"start": "2015-05-18",
"end": "2015-05-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:02.452 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:02.452 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6OmIJHY52YwyKmoL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19846/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19846/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:02.452 [print] {
"resourceType": "MedicationAdministration",
"id": "19846",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:05.584+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX03",
"display": "Altretamina"
}
]
},
"effectivePeriod": {
"start": "2015-05-18",
"end": "2015-05-26"
}
}
> *
print COOKIES
10:41:02.452 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:02.454 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:02.454 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6OmIJHY52YwyKmoL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19846/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19846/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:02.454 [print] {
"resourceType": "MedicationAdministration",
"id": "19846",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:05.584+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX03",
"display": "Altretamina"
}
]
},
"effectivePeriod": {
"start": "2015-05-18",
"end": "2015-05-26"
}
}
> *
print COOKIES
10:41:02.454 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:03.053 [print] {
"resourceType": "MedicationAdministration",
"id": "19846",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:05.584+02:00",
"source": "#6OmIJHY52YwyKmoL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX03",
"display": "Altretamina"
}
]
},
"effectivePeriod": {
"start": "2015-05-18",
"end": "2015-05-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:03.687 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:04.277 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:06.818+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:06.818+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:04.278 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC09",
"display": "Briakinumab"
}
]
},
"effectivePeriod": {
"start": "2015-10-09",
"end": "2015-09-10"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:05.924 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:05.924 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JbWlCJioxm0cee7o"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19847/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19847/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:05.924 [print] {
"resourceType": "MedicationAdministration",
"id": "19847",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:09.050+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC09",
"display": "Briakinumab"
}
]
},
"effectivePeriod": {
"start": "2015-10-09",
"end": "2015-09-10"
}
}
> *
print COOKIES
10:41:05.924 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:05.926 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:05.926 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JbWlCJioxm0cee7o"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19847/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19847/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:05.926 [print] {
"resourceType": "MedicationAdministration",
"id": "19847",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:09.050+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC09",
"display": "Briakinumab"
}
]
},
"effectivePeriod": {
"start": "2015-10-09",
"end": "2015-09-10"
}
}
> *
print COOKIES
10:41:05.926 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:06.543 [print] {
"resourceType": "MedicationAdministration",
"id": "19847",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:09.050+02:00",
"source": "#JbWlCJioxm0cee7o",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC09",
"display": "Briakinumab"
}
]
},
"effectivePeriod": {
"start": "2015-10-09",
"end": "2015-09-10"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:07.197 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:07.793 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:10.323+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:10.323+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:07.794 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC02",
"display": "Fluorouracile"
}
]
},
"effectivePeriod": {
"start": "2016-04-19",
"end": "2015-09-25"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:08.418 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:08.418 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lUf0p7xAXjxx2CNf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19848/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19848/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:08.418 [print] {
"resourceType": "MedicationAdministration",
"id": "19848",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:11.534+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC02",
"display": "Fluorouracile"
}
]
},
"effectivePeriod": {
"start": "2016-04-19",
"end": "2015-09-25"
}
}
> *
print COOKIES
10:41:08.418 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:08.419 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:08.419 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lUf0p7xAXjxx2CNf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19848/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19848/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:08.419 [print] {
"resourceType": "MedicationAdministration",
"id": "19848",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:11.534+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC02",
"display": "Fluorouracile"
}
]
},
"effectivePeriod": {
"start": "2016-04-19",
"end": "2015-09-25"
}
}
> *
print COOKIES
10:41:08.419 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:09.020 [print] {
"resourceType": "MedicationAdministration",
"id": "19848",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:11.534+02:00",
"source": "#lUf0p7xAXjxx2CNf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC02",
"display": "Fluorouracile"
}
]
},
"effectivePeriod": {
"start": "2016-04-19",
"end": "2015-09-25"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:09.658 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:11.317 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:12.773+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:12.773+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:11.317 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB03",
"display": "Salbutamolo "
}
]
},
"effectivePeriod": {
"start": "2016-07-08",
"end": "2015-12-03"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:11.938 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:11.938 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"optK4dmUoMeTNBsn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19849/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19849/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:11.938 [print] {
"resourceType": "MedicationAdministration",
"id": "19849",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:15.066+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB03",
"display": "Salbutamolo "
}
]
},
"effectivePeriod": {
"start": "2016-07-08",
"end": "2015-12-03"
}
}
> *
print COOKIES
10:41:11.938 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:11.939 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:11.939 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"optK4dmUoMeTNBsn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19849/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19849/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:11.939 [print] {
"resourceType": "MedicationAdministration",
"id": "19849",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:15.066+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB03",
"display": "Salbutamolo "
}
]
},
"effectivePeriod": {
"start": "2016-07-08",
"end": "2015-12-03"
}
}
> *
print COOKIES
10:41:11.939 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:12.551 [print] {
"resourceType": "MedicationAdministration",
"id": "19849",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:15.066+02:00",
"source": "#optK4dmUoMeTNBsn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB03",
"display": "Salbutamolo "
}
]
},
"effectivePeriod": {
"start": "2016-07-08",
"end": "2015-12-03"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:13.162 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:13.797 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:16.295+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:16.295+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:13.798 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE24",
"display": "Ponatinib"
}
]
},
"effectivePeriod": {
"start": "2016-07-21",
"end": "2016-02-02"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:14.404 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:14.404 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TkgqRcwPdv57SF3X"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19850/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19850/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:14.404 [print] {
"resourceType": "MedicationAdministration",
"id": "19850",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:17.526+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE24",
"display": "Ponatinib"
}
]
},
"effectivePeriod": {
"start": "2016-07-21",
"end": "2016-02-02"
}
}
> *
print COOKIES
10:41:14.404 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:14.405 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:14.405 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TkgqRcwPdv57SF3X"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19850/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19850/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:14.405 [print] {
"resourceType": "MedicationAdministration",
"id": "19850",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:17.526+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE24",
"display": "Ponatinib"
}
]
},
"effectivePeriod": {
"start": "2016-07-21",
"end": "2016-02-02"
}
}
> *
print COOKIES
10:41:14.405 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:15.009 [print] {
"resourceType": "MedicationAdministration",
"id": "19850",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:17.526+02:00",
"source": "#TkgqRcwPdv57SF3X",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE24",
"display": "Ponatinib"
}
]
},
"effectivePeriod": {
"start": "2016-07-21",
"end": "2016-02-02"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:15.615 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:16.214 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:18.742+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:18.742+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:16.215 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA03",
"display": "Molgramostin"
}
]
},
"effectivePeriod": {
"start": "2016-11-15",
"end": "2016-02-19"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:16.852 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:16.852 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pxjBVjoh68EYBLYI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19851/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19851/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:16.852 [print] {
"resourceType": "MedicationAdministration",
"id": "19851",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:19.962+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA03",
"display": "Molgramostin"
}
]
},
"effectivePeriod": {
"start": "2016-11-15",
"end": "2016-02-19"
}
}
> *
print COOKIES
10:41:16.852 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:16.853 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:16.853 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pxjBVjoh68EYBLYI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19851/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19851/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:16.853 [print] {
"resourceType": "MedicationAdministration",
"id": "19851",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:19.962+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA03",
"display": "Molgramostin"
}
]
},
"effectivePeriod": {
"start": "2016-11-15",
"end": "2016-02-19"
}
}
> *
print COOKIES
10:41:16.853 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:17.684 [print] {
"resourceType": "MedicationAdministration",
"id": "19851",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:19.962+02:00",
"source": "#pxjBVjoh68EYBLYI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AA03",
"display": "Molgramostin"
}
]
},
"effectivePeriod": {
"start": "2016-11-15",
"end": "2016-02-19"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:18.312 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:18.913 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:21.445+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:21.445+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:18.915 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX37",
"display": "Sitimagene ceradenovec"
}
]
},
"effectivePeriod": {
"start": "2017-03-29",
"end": "2016-04-15"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:20.537 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:20.537 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SCdfKLXdl9bFV6co"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19852/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19852/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:20.537 [print] {
"resourceType": "MedicationAdministration",
"id": "19852",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:23.665+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX37",
"display": "Sitimagene ceradenovec"
}
]
},
"effectivePeriod": {
"start": "2017-03-29",
"end": "2016-04-15"
}
}
> *
print COOKIES
10:41:20.537 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:20.538 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:20.539 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SCdfKLXdl9bFV6co"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19852/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19852/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:20.539 [print] {
"resourceType": "MedicationAdministration",
"id": "19852",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:23.665+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX37",
"display": "Sitimagene ceradenovec"
}
]
},
"effectivePeriod": {
"start": "2017-03-29",
"end": "2016-04-15"
}
}
> *
print COOKIES
10:41:20.539 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:21.150 [print] {
"resourceType": "MedicationAdministration",
"id": "19852",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:23.665+02:00",
"source": "#SCdfKLXdl9bFV6co",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX37",
"display": "Sitimagene ceradenovec"
}
]
},
"effectivePeriod": {
"start": "2017-03-29",
"end": "2016-04-15"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:21.771 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:22.402 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:24.901+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:24.901+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:22.403 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC05",
"display": "Ustekinumab"
}
]
},
"effectivePeriod": {
"start": "2017-04-07",
"end": "2016-10-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:23.008 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:23.008 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bh6nVrMiJNcpXdqV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19853/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19853/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:23.008 [print] {
"resourceType": "MedicationAdministration",
"id": "19853",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:26.134+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC05",
"display": "Ustekinumab"
}
]
},
"effectivePeriod": {
"start": "2017-04-07",
"end": "2016-10-27"
}
}
> *
print COOKIES
10:41:23.008 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:23.009 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:23.009 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bh6nVrMiJNcpXdqV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19853/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19853/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:23.009 [print] {
"resourceType": "MedicationAdministration",
"id": "19853",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:26.134+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC05",
"display": "Ustekinumab"
}
]
},
"effectivePeriod": {
"start": "2017-04-07",
"end": "2016-10-27"
}
}
> *
print COOKIES
10:41:23.009 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:23.660 [print] {
"resourceType": "MedicationAdministration",
"id": "19853",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:26.134+02:00",
"source": "#bh6nVrMiJNcpXdqV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC05",
"display": "Ustekinumab"
}
]
},
"effectivePeriod": {
"start": "2017-04-07",
"end": "2016-10-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:24.290 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:24.893 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:27.420+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:27.420+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:24.893 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC06",
"display": "Cetuximab"
}
]
},
"effectivePeriod": {
"start": "2017-11-13",
"end": "2017-06-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:25.509 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:25.509 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"p8De8TIzfOV6JhZH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19854/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19854/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:25.509 [print] {
"resourceType": "MedicationAdministration",
"id": "19854",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:28.640+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC06",
"display": "Cetuximab"
}
]
},
"effectivePeriod": {
"start": "2017-11-13",
"end": "2017-06-27"
}
}
> *
print COOKIES
10:41:25.509 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:25.510 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:25.510 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"p8De8TIzfOV6JhZH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19854/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19854/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:25.510 [print] {
"resourceType": "MedicationAdministration",
"id": "19854",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:28.640+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC06",
"display": "Cetuximab"
}
]
},
"effectivePeriod": {
"start": "2017-11-13",
"end": "2017-06-27"
}
}
> *
print COOKIES
10:41:25.511 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:26.096 [print] {
"resourceType": "MedicationAdministration",
"id": "19854",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:28.640+02:00",
"source": "#p8De8TIzfOV6JhZH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC06",
"display": "Cetuximab"
}
]
},
"effectivePeriod": {
"start": "2017-11-13",
"end": "2017-06-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:26.701 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:27.305 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:29.834+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:29.834+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:27.306 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA24",
"display": "Abatacept"
}
]
},
"effectivePeriod": {
"start": "2017-11-14",
"end": "2017-07-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:27.901 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:27.901 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ocWqAlqLs3gxBIQY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19855/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19855/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:27.901 [print] {
"resourceType": "MedicationAdministration",
"id": "19855",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:31.031+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA24",
"display": "Abatacept"
}
]
},
"effectivePeriod": {
"start": "2017-11-14",
"end": "2017-07-11"
}
}
> *
print COOKIES
10:41:27.901 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:27.903 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:27.903 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ocWqAlqLs3gxBIQY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19855/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19855/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:27.903 [print] {
"resourceType": "MedicationAdministration",
"id": "19855",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:31.031+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA24",
"display": "Abatacept"
}
]
},
"effectivePeriod": {
"start": "2017-11-14",
"end": "2017-07-11"
}
}
> *
print COOKIES
10:41:27.903 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:28.778 [print] {
"resourceType": "MedicationAdministration",
"id": "19855",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:31.031+02:00",
"source": "#ocWqAlqLs3gxBIQY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA24",
"display": "Abatacept"
}
]
},
"effectivePeriod": {
"start": "2017-11-14",
"end": "2017-07-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:29.400 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:29.995 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:32.528+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:32.528+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:29.997 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX02",
"display": "Asparaginase"
}
]
},
"effectivePeriod": {
"start": "2017-12-26",
"end": "2017-08-07"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:30.597 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:30.597 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3LoUAMSBFfY8YS78"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19856/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19856/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:30.597 [print] {
"resourceType": "MedicationAdministration",
"id": "19856",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:33.728+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX02",
"display": "Asparaginase"
}
]
},
"effectivePeriod": {
"start": "2017-12-26",
"end": "2017-08-07"
}
}
> *
print COOKIES
10:41:30.597 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:30.599 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:30.599 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3LoUAMSBFfY8YS78"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19856/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19856/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:30.599 [print] {
"resourceType": "MedicationAdministration",
"id": "19856",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:33.728+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX02",
"display": "Asparaginase"
}
]
},
"effectivePeriod": {
"start": "2017-12-26",
"end": "2017-08-07"
}
}
> *
print COOKIES
10:41:30.599 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:31.197 [print] {
"resourceType": "MedicationAdministration",
"id": "19856",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:33.728+02:00",
"source": "#3LoUAMSBFfY8YS78",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX02",
"display": "Asparaginase"
}
]
},
"effectivePeriod": {
"start": "2017-12-26",
"end": "2017-08-07"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:31.814 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:32.424 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:34.946+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:34.946+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:32.425 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC14",
"display": "Trastuzumab emtansine"
}
]
},
"effectivePeriod": {
"start": "2012-10-11",
"end": "2012-10-04"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:33.022 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"650"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:33.022 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5XAOjx47rFkfkcsi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19857/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19857/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:33.022 [print] {
"resourceType": "MedicationAdministration",
"id": "19857",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:36.153+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC14",
"display": "Trastuzumab emtansine"
}
]
},
"effectivePeriod": {
"start": "2012-10-11",
"end": "2012-10-04"
}
}
> *
print COOKIES
10:41:33.022 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:33.024 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"650"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:33.024 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5XAOjx47rFkfkcsi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19857/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19857/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:33.024 [print] {
"resourceType": "MedicationAdministration",
"id": "19857",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:36.153+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC14",
"display": "Trastuzumab emtansine"
}
]
},
"effectivePeriod": {
"start": "2012-10-11",
"end": "2012-10-04"
}
}
> *
print COOKIES
10:41:33.024 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:33.628 [print] {
"resourceType": "MedicationAdministration",
"id": "19857",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:36.153+02:00",
"source": "#5XAOjx47rFkfkcsi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC14",
"display": "Trastuzumab emtansine"
}
]
},
"effectivePeriod": {
"start": "2012-10-11",
"end": "2012-10-04"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:34.240 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:34.844 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:37.372+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:37.372+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:34.845 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB01",
"display": "Doxorubicina "
}
]
},
"effectivePeriod": {
"start": "2012-11-21",
"end": "2012-11-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:35.441 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"645"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:35.441 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3aTSFK5tGW6OPXza"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19858/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19858/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:35.441 [print] {
"resourceType": "MedicationAdministration",
"id": "19858",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:38.573+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB01",
"display": "Doxorubicina "
}
]
},
"effectivePeriod": {
"start": "2012-11-21",
"end": "2012-11-30"
}
}
> *
print COOKIES
10:41:35.441 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:35.443 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"645"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:35.443 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3aTSFK5tGW6OPXza"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19858/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19858/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:35.443 [print] {
"resourceType": "MedicationAdministration",
"id": "19858",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:38.573+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB01",
"display": "Doxorubicina "
}
]
},
"effectivePeriod": {
"start": "2012-11-21",
"end": "2012-11-30"
}
}
> *
print COOKIES
10:41:35.443 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:36.034 [print] {
"resourceType": "MedicationAdministration",
"id": "19858",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:38.573+02:00",
"source": "#3aTSFK5tGW6OPXza",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB01",
"display": "Doxorubicina "
}
]
},
"effectivePeriod": {
"start": "2012-11-21",
"end": "2012-11-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:36.661 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:37.315 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:39.789+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:39.789+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:37.315 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC02",
"display": "Triaziquone"
}
]
},
"effectivePeriod": {
"start": "2013-03-08",
"end": "2013-01-24"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:37.916 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:37.916 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iUBy0JldcCYkz2aZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19859/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19859/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:37.916 [print] {
"resourceType": "MedicationAdministration",
"id": "19859",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:41.045+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC02",
"display": "Triaziquone"
}
]
},
"effectivePeriod": {
"start": "2013-03-08",
"end": "2013-01-24"
}
}
> *
print COOKIES
10:41:37.916 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:37.918 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:37.918 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iUBy0JldcCYkz2aZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19859/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19859/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:37.919 [print] {
"resourceType": "MedicationAdministration",
"id": "19859",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:41.045+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC02",
"display": "Triaziquone"
}
]
},
"effectivePeriod": {
"start": "2013-03-08",
"end": "2013-01-24"
}
}
> *
print COOKIES
10:41:37.919 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:38.523 [print] {
"resourceType": "MedicationAdministration",
"id": "19859",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:41.045+02:00",
"source": "#iUBy0JldcCYkz2aZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC02",
"display": "Triaziquone"
}
]
},
"effectivePeriod": {
"start": "2013-03-08",
"end": "2013-01-24"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:39.172 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 13ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 13ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:39.798 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:42.284+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:42.284+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:39.800 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX15",
"display": "Mifamurtide"
}
]
},
"effectivePeriod": {
"start": "2013-04-05",
"end": "2013-10-10"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:40.426 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:40.426 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gcL9zlHXg0Q4POoM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19860/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19860/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:40.426 [print] {
"resourceType": "MedicationAdministration",
"id": "19860",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:43.543+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX15",
"display": "Mifamurtide"
}
]
},
"effectivePeriod": {
"start": "2013-04-05",
"end": "2013-10-10"
}
}
> *
print COOKIES
10:41:40.426 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:40.428 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:40.428 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gcL9zlHXg0Q4POoM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19860/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19860/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:40.428 [print] {
"resourceType": "MedicationAdministration",
"id": "19860",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:43.543+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX15",
"display": "Mifamurtide"
}
]
},
"effectivePeriod": {
"start": "2013-04-05",
"end": "2013-10-10"
}
}
> *
print COOKIES
10:41:40.428 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:41.043 [print] {
"resourceType": "MedicationAdministration",
"id": "19860",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:43.543+02:00",
"source": "#gcL9zlHXg0Q4POoM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX15",
"display": "Mifamurtide"
}
]
},
"effectivePeriod": {
"start": "2013-04-05",
"end": "2013-10-10"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:41.688 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:42.299 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:44.818+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:44.818+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:42.300 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC11",
"display": "Siltuximab"
}
]
},
"effectivePeriod": {
"start": "2014-03-03",
"end": "2013-11-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:42.910 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:42.910 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XP9QvDd3E7YnSGZn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19861/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19861/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:42.910 [print] {
"resourceType": "MedicationAdministration",
"id": "19861",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:46.041+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC11",
"display": "Siltuximab"
}
]
},
"effectivePeriod": {
"start": "2014-03-03",
"end": "2013-11-27"
}
}
> *
print COOKIES
10:41:42.910 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:42.911 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:42.911 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XP9QvDd3E7YnSGZn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19861/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19861/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:42.911 [print] {
"resourceType": "MedicationAdministration",
"id": "19861",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:46.041+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC11",
"display": "Siltuximab"
}
]
},
"effectivePeriod": {
"start": "2014-03-03",
"end": "2013-11-27"
}
}
> *
print COOKIES
10:41:42.911 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:43.503 [print] {
"resourceType": "MedicationAdministration",
"id": "19861",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:46.041+02:00",
"source": "#XP9QvDd3E7YnSGZn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC11",
"display": "Siltuximab"
}
]
},
"effectivePeriod": {
"start": "2014-03-03",
"end": "2013-11-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:44.116 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:44.734 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:47.251+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:47.251+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:44.735 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB61",
"display": "Peginterferon alfa-2a, combinations"
}
]
},
"effectivePeriod": {
"start": "2014-04-21",
"end": "2013-12-24"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:45.350 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"664"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:45.350 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IZ2gDpu9aO7Yrc3p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19862/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19862/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:45.350 [print] {
"resourceType": "MedicationAdministration",
"id": "19862",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:48.471+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB61",
"display": "Peginterferon alfa-2a, combinations"
}
]
},
"effectivePeriod": {
"start": "2014-04-21",
"end": "2013-12-24"
}
}
> *
print COOKIES
10:41:45.350 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:45.351 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"664"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:45.351 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IZ2gDpu9aO7Yrc3p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19862/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19862/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:45.351 [print] {
"resourceType": "MedicationAdministration",
"id": "19862",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:48.471+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB61",
"display": "Peginterferon alfa-2a, combinations"
}
]
},
"effectivePeriod": {
"start": "2014-04-21",
"end": "2013-12-24"
}
}
> *
print COOKIES
10:41:45.351 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:45.948 [print] {
"resourceType": "MedicationAdministration",
"id": "19862",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:48.471+02:00",
"source": "#IZ2gDpu9aO7Yrc3p",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB61",
"display": "Peginterferon alfa-2a, combinations"
}
]
},
"effectivePeriod": {
"start": "2014-04-21",
"end": "2013-12-24"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:46.586 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:47.191 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:49.704+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:49.704+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:47.192 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC08",
"display": "Decitabina"
}
]
},
"effectivePeriod": {
"start": "2014-04-22",
"end": "2014-09-24"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:47.816 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:47.816 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RGTOROZ5rvrrIj1O"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19863/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19863/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:47.816 [print] {
"resourceType": "MedicationAdministration",
"id": "19863",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:50.941+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC08",
"display": "Decitabina"
}
]
},
"effectivePeriod": {
"start": "2014-04-22",
"end": "2014-09-24"
}
}
> *
print COOKIES
10:41:47.816 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:47.818 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:47.818 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RGTOROZ5rvrrIj1O"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19863/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19863/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:47.818 [print] {
"resourceType": "MedicationAdministration",
"id": "19863",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:50.941+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC08",
"display": "Decitabina"
}
]
},
"effectivePeriod": {
"start": "2014-04-22",
"end": "2014-09-24"
}
}
> *
print COOKIES
10:41:47.818 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:48.422 [print] {
"resourceType": "MedicationAdministration",
"id": "19863",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:50.941+02:00",
"source": "#RGTOROZ5rvrrIj1O",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC08",
"display": "Decitabina"
}
]
},
"effectivePeriod": {
"start": "2014-04-22",
"end": "2014-09-24"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:49.042 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:49.667 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:52.172+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:52.172+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:49.668 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX01",
"display": "Azatioprina"
}
]
},
"effectivePeriod": {
"start": "2014-05-02",
"end": "2015-06-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:50.258 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:50.258 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Na9eNNgNCF3jbqcs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19864/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19864/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:50.258 [print] {
"resourceType": "MedicationAdministration",
"id": "19864",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:53.388+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX01",
"display": "Azatioprina"
}
]
},
"effectivePeriod": {
"start": "2014-05-02",
"end": "2015-06-17"
}
}
> *
print COOKIES
10:41:50.258 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:50.260 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:50.260 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Na9eNNgNCF3jbqcs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19864/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19864/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:50.260 [print] {
"resourceType": "MedicationAdministration",
"id": "19864",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:53.388+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX01",
"display": "Azatioprina"
}
]
},
"effectivePeriod": {
"start": "2014-05-02",
"end": "2015-06-17"
}
}
> *
print COOKIES
10:41:50.260 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:50.898 [print] {
"resourceType": "MedicationAdministration",
"id": "19864",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:53.388+02:00",
"source": "#Na9eNNgNCF3jbqcs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX01",
"display": "Azatioprina"
}
]
},
"effectivePeriod": {
"start": "2014-05-02",
"end": "2015-06-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:51.550 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:52.157 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:54.681+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:54.681+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:52.158 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB01",
"display": "Megestrolo "
}
]
},
"effectivePeriod": {
"start": "2014-05-12",
"end": "2015-06-24"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:52.800 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:52.800 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jr68qicJ8P84QJf7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19865/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19865/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:52.800 [print] {
"resourceType": "MedicationAdministration",
"id": "19865",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:55.917+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB01",
"display": "Megestrolo "
}
]
},
"effectivePeriod": {
"start": "2014-05-12",
"end": "2015-06-24"
}
}
> *
print COOKIES
10:41:52.800 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:52.802 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:52.802 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jr68qicJ8P84QJf7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19865/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19865/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:52.802 [print] {
"resourceType": "MedicationAdministration",
"id": "19865",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:55.917+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB01",
"display": "Megestrolo "
}
]
},
"effectivePeriod": {
"start": "2014-05-12",
"end": "2015-06-24"
}
}
> *
print COOKIES
10:41:52.802 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:53.415 [print] {
"resourceType": "MedicationAdministration",
"id": "19865",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:55.917+02:00",
"source": "#jr68qicJ8P84QJf7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AB01",
"display": "Megestrolo "
}
]
},
"effectivePeriod": {
"start": "2014-05-12",
"end": "2015-06-24"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:54.029 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:54.635 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:57.159+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:57.159+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:54.636 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC21",
"display": "Ramucirumab"
}
]
},
"effectivePeriod": {
"start": "2014-05-26",
"end": "2015-07-31"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:55.244 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:55.244 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GHQ3lPGphPVQJRkk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19866/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19866/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:55.244 [print] {
"resourceType": "MedicationAdministration",
"id": "19866",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:58.373+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC21",
"display": "Ramucirumab"
}
]
},
"effectivePeriod": {
"start": "2014-05-26",
"end": "2015-07-31"
}
}
> *
print COOKIES
10:41:55.244 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:55.246 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:55.246 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GHQ3lPGphPVQJRkk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19866/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:41:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19866/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:41:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:55.246 [print] {
"resourceType": "MedicationAdministration",
"id": "19866",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:58.373+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC21",
"display": "Ramucirumab"
}
]
},
"effectivePeriod": {
"start": "2014-05-26",
"end": "2015-07-31"
}
}
> *
print COOKIES
10:41:55.246 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:55.853 [print] {
"resourceType": "MedicationAdministration",
"id": "19866",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:41:58.373+02:00",
"source": "#GHQ3lPGphPVQJRkk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC21",
"display": "Ramucirumab"
}
]
},
"effectivePeriod": {
"start": "2014-05-26",
"end": "2015-07-31"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:56.478 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:57.084 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:41:59.611+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:41:59.611+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:57.085 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX18",
"display": "Tiazofurina"
}
]
},
"effectivePeriod": {
"start": "2014-12-25",
"end": "2015-09-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:57.701 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:57.701 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9XO09HlIVsCWSY3w"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19867/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19867/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:57.701 [print] {
"resourceType": "MedicationAdministration",
"id": "19867",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:00.826+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX18",
"display": "Tiazofurina"
}
]
},
"effectivePeriod": {
"start": "2014-12-25",
"end": "2015-09-17"
}
}
> *
print COOKIES
10:41:57.701 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:57.702 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:57.702 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9XO09HlIVsCWSY3w"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19867/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19867/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:57.702 [print] {
"resourceType": "MedicationAdministration",
"id": "19867",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:00.826+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX18",
"display": "Tiazofurina"
}
]
},
"effectivePeriod": {
"start": "2014-12-25",
"end": "2015-09-17"
}
}
> *
print COOKIES
10:41:57.702 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:58.318 [print] {
"resourceType": "MedicationAdministration",
"id": "19867",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:00.826+02:00",
"source": "#9XO09HlIVsCWSY3w",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX18",
"display": "Tiazofurina"
}
]
},
"effectivePeriod": {
"start": "2014-12-25",
"end": "2015-09-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:58.934 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:59.787 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:42:02.066+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:42:02.066+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:41:59.788 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE02",
"display": "Gefitinib"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2015-12-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:00.413 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:00.414 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uTOP92oBERqRmemV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19868/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19868/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:00.414 [print] {
"resourceType": "MedicationAdministration",
"id": "19868",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:03.543+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE02",
"display": "Gefitinib"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2015-12-17"
}
}
> *
print COOKIES
10:42:00.414 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:00.416 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:00.416 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uTOP92oBERqRmemV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19868/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19868/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:00.416 [print] {
"resourceType": "MedicationAdministration",
"id": "19868",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:03.543+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE02",
"display": "Gefitinib"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2015-12-17"
}
}
> *
print COOKIES
10:42:00.416 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:01.029 [print] {
"resourceType": "MedicationAdministration",
"id": "19868",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:03.543+02:00",
"source": "#uTOP92oBERqRmemV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE02",
"display": "Gefitinib"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2015-12-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:01.736 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:02.366 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:42:04.856+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:42:04.856+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:42:02.367 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA06",
"display": "Ifosfamide"
}
]
},
"effectivePeriod": {
"start": "2015-09-09",
"end": "2016-03-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:03.006 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:03.006 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aOwmuUOjmRIEbUH4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19869/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19869/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:03.006 [print] {
"resourceType": "MedicationAdministration",
"id": "19869",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:06.130+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA06",
"display": "Ifosfamide"
}
]
},
"effectivePeriod": {
"start": "2015-09-09",
"end": "2016-03-23"
}
}
> *
print COOKIES
10:42:03.006 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:03.007 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:03.007 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aOwmuUOjmRIEbUH4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19869/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19869/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:03.007 [print] {
"resourceType": "MedicationAdministration",
"id": "19869",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:06.130+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA06",
"display": "Ifosfamide"
}
]
},
"effectivePeriod": {
"start": "2015-09-09",
"end": "2016-03-23"
}
}
> *
print COOKIES
10:42:03.007 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:03.864 [print] {
"resourceType": "MedicationAdministration",
"id": "19869",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:06.130+02:00",
"source": "#aOwmuUOjmRIEbUH4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA06",
"display": "Ifosfamide"
}
]
},
"effectivePeriod": {
"start": "2015-09-09",
"end": "2016-03-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:04.459 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:05.048 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:42:07.593+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:42:07.593+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:42:05.049 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA02",
"display": "Muromonab-CD3"
}
]
},
"effectivePeriod": {
"start": "2015-10-08",
"end": "2016-05-12"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:05.650 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:05.650 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"u8yiO2vdZXsqMqa6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19870/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19870/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:05.650 [print] {
"resourceType": "MedicationAdministration",
"id": "19870",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:08.780+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA02",
"display": "Muromonab-CD3"
}
]
},
"effectivePeriod": {
"start": "2015-10-08",
"end": "2016-05-12"
}
}
> *
print COOKIES
10:42:05.650 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:05.653 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:05.653 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"u8yiO2vdZXsqMqa6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19870/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19870/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:05.653 [print] {
"resourceType": "MedicationAdministration",
"id": "19870",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:08.780+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA02",
"display": "Muromonab-CD3"
}
]
},
"effectivePeriod": {
"start": "2015-10-08",
"end": "2016-05-12"
}
}
> *
print COOKIES
10:42:05.653 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:06.251 [print] {
"resourceType": "MedicationAdministration",
"id": "19870",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:08.780+02:00",
"source": "#u8yiO2vdZXsqMqa6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA02",
"display": "Muromonab-CD3"
}
]
},
"effectivePeriod": {
"start": "2015-10-08",
"end": "2016-05-12"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:06.855 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:07.470 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:42:09.987+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:42:09.987+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:42:07.471 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE14",
"display": "Bosutinib"
}
]
},
"effectivePeriod": {
"start": "2015-10-19",
"end": "2016-05-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:08.101 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:08.101 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7pkhgAUlObQ8ZKxq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19871/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19871/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:08.101 [print] {
"resourceType": "MedicationAdministration",
"id": "19871",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:11.227+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE14",
"display": "Bosutinib"
}
]
},
"effectivePeriod": {
"start": "2015-10-19",
"end": "2016-05-26"
}
}
> *
print COOKIES
10:42:08.101 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:08.102 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:08.102 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7pkhgAUlObQ8ZKxq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19871/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19871/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:08.103 [print] {
"resourceType": "MedicationAdministration",
"id": "19871",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:11.227+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE14",
"display": "Bosutinib"
}
]
},
"effectivePeriod": {
"start": "2015-10-19",
"end": "2016-05-26"
}
}
> *
print COOKIES
10:42:08.103 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:08.722 [print] {
"resourceType": "MedicationAdministration",
"id": "19871",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:11.227+02:00",
"source": "#7pkhgAUlObQ8ZKxq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE14",
"display": "Bosutinib"
}
]
},
"effectivePeriod": {
"start": "2015-10-19",
"end": "2016-05-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:09.349 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:09.947 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:42:12.480+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:42:12.480+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:42:09.948 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC01",
"display": "Thiotepa"
}
]
},
"effectivePeriod": {
"start": "2015-11-24",
"end": "2016-07-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:10.549 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:10.549 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FgepYmOId4g7QGo8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19872/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19872/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:10.549 [print] {
"resourceType": "MedicationAdministration",
"id": "19872",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:13.681+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC01",
"display": "Thiotepa"
}
]
},
"effectivePeriod": {
"start": "2015-11-24",
"end": "2016-07-27"
}
}
> *
print COOKIES
10:42:10.549 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:10.550 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:10.550 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FgepYmOId4g7QGo8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19872/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19872/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:10.551 [print] {
"resourceType": "MedicationAdministration",
"id": "19872",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:13.681+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC01",
"display": "Thiotepa"
}
]
},
"effectivePeriod": {
"start": "2015-11-24",
"end": "2016-07-27"
}
}
> *
print COOKIES
10:42:10.551 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:11.137 [print] {
"resourceType": "MedicationAdministration",
"id": "19872",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:13.681+02:00",
"source": "#FgepYmOId4g7QGo8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC01",
"display": "Thiotepa"
}
]
},
"effectivePeriod": {
"start": "2015-11-24",
"end": "2016-07-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:11.750 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:12.397 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:42:14.882+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:42:14.882+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:42:12.398 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA01",
"display": "Tamoxifene "
}
]
},
"effectivePeriod": {
"start": "2015-11-26",
"end": "2016-08-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:12.990 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:12.990 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3nOcvWBgsTmyCvu6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19873/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19873/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:12.990 [print] {
"resourceType": "MedicationAdministration",
"id": "19873",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:16.122+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA01",
"display": "Tamoxifene "
}
]
},
"effectivePeriod": {
"start": "2015-11-26",
"end": "2016-08-17"
}
}
> *
print COOKIES
10:42:12.990 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:12.992 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:12.992 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3nOcvWBgsTmyCvu6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19873/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19873/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:12.992 [print] {
"resourceType": "MedicationAdministration",
"id": "19873",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:16.122+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA01",
"display": "Tamoxifene "
}
]
},
"effectivePeriod": {
"start": "2015-11-26",
"end": "2016-08-17"
}
}
> *
print COOKIES
10:42:12.992 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:13.611 [print] {
"resourceType": "MedicationAdministration",
"id": "19873",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:16.122+02:00",
"source": "#3nOcvWBgsTmyCvu6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA01",
"display": "Tamoxifene "
}
]
},
"effectivePeriod": {
"start": "2015-11-26",
"end": "2016-08-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:14.230 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:14.824 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:42:17.360+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:42:17.360+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:42:14.826 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX29",
"display": "Denileukin diftitox"
}
]
},
"effectivePeriod": {
"start": "2016-05-12",
"end": "2016-09-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:15.436 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:15.436 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pXQlwn7DJr1j2OVU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19874/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19874/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:15.436 [print] {
"resourceType": "MedicationAdministration",
"id": "19874",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:18.561+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX29",
"display": "Denileukin diftitox"
}
]
},
"effectivePeriod": {
"start": "2016-05-12",
"end": "2016-09-26"
}
}
> *
print COOKIES
10:42:15.436 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:15.438 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:15.438 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pXQlwn7DJr1j2OVU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19874/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19874/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:15.438 [print] {
"resourceType": "MedicationAdministration",
"id": "19874",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:18.561+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX29",
"display": "Denileukin diftitox"
}
]
},
"effectivePeriod": {
"start": "2016-05-12",
"end": "2016-09-26"
}
}
> *
print COOKIES
10:42:15.438 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:16.041 [print] {
"resourceType": "MedicationAdministration",
"id": "19874",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:18.561+02:00",
"source": "#pXQlwn7DJr1j2OVU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX29",
"display": "Denileukin diftitox"
}
]
},
"effectivePeriod": {
"start": "2016-05-12",
"end": "2016-09-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:16.656 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:17.265 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:42:19.789+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:42:19.789+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:42:17.266 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA07",
"display": "Trofosfamide"
}
]
},
"effectivePeriod": {
"start": "2016-08-22",
"end": "2016-11-02"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:17.879 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:17.879 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vRw89uZEJNl4MNxB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19875/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19875/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:17.879 [print] {
"resourceType": "MedicationAdministration",
"id": "19875",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:21.006+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA07",
"display": "Trofosfamide"
}
]
},
"effectivePeriod": {
"start": "2016-08-22",
"end": "2016-11-02"
}
}
> *
print COOKIES
10:42:17.879 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:17.882 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:17.883 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vRw89uZEJNl4MNxB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19875/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19875/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:17.883 [print] {
"resourceType": "MedicationAdministration",
"id": "19875",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:21.006+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA07",
"display": "Trofosfamide"
}
]
},
"effectivePeriod": {
"start": "2016-08-22",
"end": "2016-11-02"
}
}
> *
print COOKIES
10:42:17.883 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:18.504 [print] {
"resourceType": "MedicationAdministration",
"id": "19875",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:21.006+02:00",
"source": "#vRw89uZEJNl4MNxB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA07",
"display": "Trofosfamide"
}
]
},
"effectivePeriod": {
"start": "2016-08-22",
"end": "2016-11-02"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:19.212 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:19.803 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:42:22.343+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:42:22.343+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:42:19.804 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE10",
"display": "Everolimus"
}
]
},
"effectivePeriod": {
"start": "2016-10-05",
"end": "2017-02-03"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:20.422 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:20.422 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B8tGz0i24TIuCrFp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19876/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19876/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:20.422 [print] {
"resourceType": "MedicationAdministration",
"id": "19876",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:23.548+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE10",
"display": "Everolimus"
}
]
},
"effectivePeriod": {
"start": "2016-10-05",
"end": "2017-02-03"
}
}
> *
print COOKIES
10:42:20.422 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:20.424 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:20.424 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B8tGz0i24TIuCrFp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19876/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19876/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:20.424 [print] {
"resourceType": "MedicationAdministration",
"id": "19876",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:23.548+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE10",
"display": "Everolimus"
}
]
},
"effectivePeriod": {
"start": "2016-10-05",
"end": "2017-02-03"
}
}
> *
print COOKIES
10:42:20.424 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:21.026 [print] {
"resourceType": "MedicationAdministration",
"id": "19876",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:23.548+02:00",
"source": "#B8tGz0i24TIuCrFp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE10",
"display": "Everolimus"
}
]
},
"effectivePeriod": {
"start": "2016-10-05",
"end": "2017-02-03"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:21.626 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:22.269 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:42:24.758+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:42:24.758+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:42:22.269 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA08",
"display": "Prednimustine"
}
]
},
"effectivePeriod": {
"start": "2017-01-23",
"end": "2017-04-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:22.905 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:22.905 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"n9uJxgkG6mHQiiEF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19877/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19877/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:22.905 [print] {
"resourceType": "MedicationAdministration",
"id": "19877",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:26.004+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA08",
"display": "Prednimustine"
}
]
},
"effectivePeriod": {
"start": "2017-01-23",
"end": "2017-04-11"
}
}
> *
print COOKIES
10:42:22.905 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:22.907 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:22.907 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"n9uJxgkG6mHQiiEF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19877/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19877/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:22.907 [print] {
"resourceType": "MedicationAdministration",
"id": "19877",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:26.004+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA08",
"display": "Prednimustine"
}
]
},
"effectivePeriod": {
"start": "2017-01-23",
"end": "2017-04-11"
}
}
> *
print COOKIES
10:42:22.907 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:23.530 [print] {
"resourceType": "MedicationAdministration",
"id": "19877",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:26.004+02:00",
"source": "#n9uJxgkG6mHQiiEF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA08",
"display": "Prednimustine"
}
]
},
"effectivePeriod": {
"start": "2017-01-23",
"end": "2017-04-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:24.144 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:24.748 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:42:27.272+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:42:27.272+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:42:24.749 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB07",
"display": "Nelarabina"
}
]
},
"effectivePeriod": {
"start": "2017-06-06",
"end": "2017-04-20"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:25.361 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:25.362 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pQqhGNAHcNML4FE0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19878/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19878/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:25.362 [print] {
"resourceType": "MedicationAdministration",
"id": "19878",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:28.494+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB07",
"display": "Nelarabina"
}
]
},
"effectivePeriod": {
"start": "2017-06-06",
"end": "2017-04-20"
}
}
> *
print COOKIES
10:42:25.362 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:25.365 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:25.365 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pQqhGNAHcNML4FE0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19878/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19878/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:25.365 [print] {
"resourceType": "MedicationAdministration",
"id": "19878",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:28.494+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB07",
"display": "Nelarabina"
}
]
},
"effectivePeriod": {
"start": "2017-06-06",
"end": "2017-04-20"
}
}
> *
print COOKIES
10:42:25.365 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:25.981 [print] {
"resourceType": "MedicationAdministration",
"id": "19878",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:28.494+02:00",
"source": "#pQqhGNAHcNML4FE0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB07",
"display": "Nelarabina"
}
]
},
"effectivePeriod": {
"start": "2017-06-06",
"end": "2017-04-20"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:26.603 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:27.217 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:42:29.726+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:42:29.726+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:42:27.218 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB11",
"display": "Peginterferone alfa-2a"
}
]
},
"effectivePeriod": {
"start": "2017-06-13",
"end": "2017-05-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:27.854 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:27.854 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pUHAYlIjWTfYgix0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19879/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19879/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:27.854 [print] {
"resourceType": "MedicationAdministration",
"id": "19879",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:30.981+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB11",
"display": "Peginterferone alfa-2a"
}
]
},
"effectivePeriod": {
"start": "2017-06-13",
"end": "2017-05-16"
}
}
> *
print COOKIES
10:42:27.854 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:27.856 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:27.856 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pUHAYlIjWTfYgix0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19879/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19879/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:27.856 [print] {
"resourceType": "MedicationAdministration",
"id": "19879",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:30.981+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB11",
"display": "Peginterferone alfa-2a"
}
]
},
"effectivePeriod": {
"start": "2017-06-13",
"end": "2017-05-16"
}
}
> *
print COOKIES
10:42:27.856 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:28.587 [print] {
"resourceType": "MedicationAdministration",
"id": "19879",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:30.981+02:00",
"source": "#pUHAYlIjWTfYgix0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB11",
"display": "Peginterferone alfa-2a"
}
]
},
"effectivePeriod": {
"start": "2017-06-13",
"end": "2017-05-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:29.202 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:30.202 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:42:32.335+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:42:32.335+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:42:30.203 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX17",
"display": "Topotecan "
}
]
},
"effectivePeriod": {
"start": "2017-10-11",
"end": "2017-05-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:30.837 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:30.837 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nsKJnLGXHiT0ljUt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19880/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19880/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:30.837 [print] {
"resourceType": "MedicationAdministration",
"id": "19880",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:33.948+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX17",
"display": "Topotecan "
}
]
},
"effectivePeriod": {
"start": "2017-10-11",
"end": "2017-05-26"
}
}
> *
print COOKIES
10:42:30.838 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:30.839 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:30.839 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nsKJnLGXHiT0ljUt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19880/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19880/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:30.839 [print] {
"resourceType": "MedicationAdministration",
"id": "19880",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:33.948+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX17",
"display": "Topotecan "
}
]
},
"effectivePeriod": {
"start": "2017-10-11",
"end": "2017-05-26"
}
}
> *
print COOKIES
10:42:30.839 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:31.448 [print] {
"resourceType": "MedicationAdministration",
"id": "19880",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:33.948+02:00",
"source": "#nsKJnLGXHiT0ljUt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX17",
"display": "Topotecan "
}
]
},
"effectivePeriod": {
"start": "2017-10-11",
"end": "2017-05-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:32.052 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:32.685 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:42:35.186+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:42:35.186+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:42:32.686 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB10",
"display": "Amrubicina"
}
]
},
"effectivePeriod": {
"start": "2017-12-29",
"end": "2017-07-28"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:33.311 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:33.311 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aYTu0FcPivJTkVTA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19881/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19881/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:33.311 [print] {
"resourceType": "MedicationAdministration",
"id": "19881",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:36.435+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB10",
"display": "Amrubicina"
}
]
},
"effectivePeriod": {
"start": "2017-12-29",
"end": "2017-07-28"
}
}
> *
print COOKIES
10:42:33.311 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:33.313 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:33.313 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aYTu0FcPivJTkVTA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19881/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19881/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:33.313 [print] {
"resourceType": "MedicationAdministration",
"id": "19881",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:36.435+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB10",
"display": "Amrubicina"
}
]
},
"effectivePeriod": {
"start": "2017-12-29",
"end": "2017-07-28"
}
}
> *
print COOKIES
10:42:33.313 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:34.271 [print] {
"resourceType": "MedicationAdministration",
"id": "19881",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:36.435+02:00",
"source": "#aYTu0FcPivJTkVTA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB10",
"display": "Amrubicina"
}
]
},
"effectivePeriod": {
"start": "2017-12-29",
"end": "2017-07-28"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:34.904 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:35.774 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:42:38.027+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:42:38.027+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:42:35.775 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato sale sodico"
}
]
},
"effectivePeriod": {
"start": "2012-11-19",
"end": "2013-01-03"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:36.430 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"652"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:36.430 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8CzNwneD1RXkjmcA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19882/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19882/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:36.430 [print] {
"resourceType": "MedicationAdministration",
"id": "19882",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:39.551+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato sale sodico"
}
]
},
"effectivePeriod": {
"start": "2012-11-19",
"end": "2013-01-03"
}
}
> *
print COOKIES
10:42:36.430 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:36.432 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"652"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:36.432 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8CzNwneD1RXkjmcA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19882/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19882/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:36.432 [print] {
"resourceType": "MedicationAdministration",
"id": "19882",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:39.551+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato sale sodico"
}
]
},
"effectivePeriod": {
"start": "2012-11-19",
"end": "2013-01-03"
}
}
> *
print COOKIES
10:42:36.432 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:37.039 [print] {
"resourceType": "MedicationAdministration",
"id": "19882",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:39.551+02:00",
"source": "#8CzNwneD1RXkjmcA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato sale sodico"
}
]
},
"effectivePeriod": {
"start": "2012-11-19",
"end": "2013-01-03"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:37.637 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:38.347 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:42:40.771+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:42:40.771+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:42:38.349 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE25",
"display": "Trametinib"
}
]
},
"effectivePeriod": {
"start": "2012-12-10",
"end": "2013-02-01"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:38.941 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:38.941 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ormUwM2XlUpttPLr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19883/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19883/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:38.941 [print] {
"resourceType": "MedicationAdministration",
"id": "19883",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:42.074+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE25",
"display": "Trametinib"
}
]
},
"effectivePeriod": {
"start": "2012-12-10",
"end": "2013-02-01"
}
}
> *
print COOKIES
10:42:38.941 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:38.943 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:38.943 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ormUwM2XlUpttPLr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19883/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19883/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:38.943 [print] {
"resourceType": "MedicationAdministration",
"id": "19883",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:42.074+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE25",
"display": "Trametinib"
}
]
},
"effectivePeriod": {
"start": "2012-12-10",
"end": "2013-02-01"
}
}
> *
print COOKIES
10:42:38.943 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:40.556 [print] {
"resourceType": "MedicationAdministration",
"id": "19883",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:42.074+02:00",
"source": "#ormUwM2XlUpttPLr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE25",
"display": "Trametinib"
}
]
},
"effectivePeriod": {
"start": "2012-12-10",
"end": "2013-02-01"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:41.171 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:41.793 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:42:44.291+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:42:44.291+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:42:41.794 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC10",
"display": "Secukinumab"
}
]
},
"effectivePeriod": {
"start": "2013-04-10",
"end": "2013-10-24"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:42.419 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:42.419 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ONRKQ0kQYhfR646e"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19884/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19884/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:42.419 [print] {
"resourceType": "MedicationAdministration",
"id": "19884",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:45.521+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC10",
"display": "Secukinumab"
}
]
},
"effectivePeriod": {
"start": "2013-04-10",
"end": "2013-10-24"
}
}
> *
print COOKIES
10:42:42.419 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:42.420 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:42.420 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ONRKQ0kQYhfR646e"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19884/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19884/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:42.420 [print] {
"resourceType": "MedicationAdministration",
"id": "19884",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:45.521+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC10",
"display": "Secukinumab"
}
]
},
"effectivePeriod": {
"start": "2013-04-10",
"end": "2013-10-24"
}
}
> *
print COOKIES
10:42:42.421 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:43.027 [print] {
"resourceType": "MedicationAdministration",
"id": "19884",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:45.521+02:00",
"source": "#ONRKQ0kQYhfR646e",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC10",
"display": "Secukinumab"
}
]
},
"effectivePeriod": {
"start": "2013-04-10",
"end": "2013-10-24"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:43.973 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:44.639 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:42:47.101+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:42:47.101+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:42:44.640 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE07",
"display": "lapatinib"
}
]
},
"effectivePeriod": {
"start": "2013-07-05",
"end": "2014-03-12"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:46.297 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:46.297 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ulJjo613BacImzE6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19885/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19885/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:46.297 [print] {
"resourceType": "MedicationAdministration",
"id": "19885",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:49.425+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE07",
"display": "lapatinib"
}
]
},
"effectivePeriod": {
"start": "2013-07-05",
"end": "2014-03-12"
}
}
> *
print COOKIES
10:42:46.297 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:46.299 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:46.299 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ulJjo613BacImzE6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19885/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19885/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:46.299 [print] {
"resourceType": "MedicationAdministration",
"id": "19885",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:49.425+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE07",
"display": "lapatinib"
}
]
},
"effectivePeriod": {
"start": "2013-07-05",
"end": "2014-03-12"
}
}
> *
print COOKIES
10:42:46.299 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:46.920 [print] {
"resourceType": "MedicationAdministration",
"id": "19885",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:49.425+02:00",
"source": "#ulJjo613BacImzE6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE07",
"display": "lapatinib"
}
]
},
"effectivePeriod": {
"start": "2013-07-05",
"end": "2014-03-12"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:48.050 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:48.666 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:42:51.180+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:42:51.180+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:42:48.667 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE26",
"display": "Cabozantinib"
}
]
},
"effectivePeriod": {
"start": "2013-10-16",
"end": "2014-04-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:49.305 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:49.305 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oGgxXZ57boFUFW7H"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19886/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19886/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:49.305 [print] {
"resourceType": "MedicationAdministration",
"id": "19886",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:52.434+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE26",
"display": "Cabozantinib"
}
]
},
"effectivePeriod": {
"start": "2013-10-16",
"end": "2014-04-30"
}
}
> *
print COOKIES
10:42:49.305 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:49.307 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:49.307 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oGgxXZ57boFUFW7H"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19886/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19886/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:49.307 [print] {
"resourceType": "MedicationAdministration",
"id": "19886",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:52.434+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE26",
"display": "Cabozantinib"
}
]
},
"effectivePeriod": {
"start": "2013-10-16",
"end": "2014-04-30"
}
}
> *
print COOKIES
10:42:49.307 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:49.924 [print] {
"resourceType": "MedicationAdministration",
"id": "19886",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:52.434+02:00",
"source": "#oGgxXZ57boFUFW7H",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE26",
"display": "Cabozantinib"
}
]
},
"effectivePeriod": {
"start": "2013-10-16",
"end": "2014-04-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:50.538 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:51.153 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:42:53.662+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:42:53.662+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:42:51.153 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX16",
"display": "Plerixafor"
}
]
},
"effectivePeriod": {
"start": "2014-02-20",
"end": "2014-05-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:51.807 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:51.807 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"N56MDz5ATgUUEQO1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19887/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19887/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:51.807 [print] {
"resourceType": "MedicationAdministration",
"id": "19887",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:54.909+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX16",
"display": "Plerixafor"
}
]
},
"effectivePeriod": {
"start": "2014-02-20",
"end": "2014-05-16"
}
}
> *
print COOKIES
10:42:51.807 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:51.808 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:51.808 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"N56MDz5ATgUUEQO1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19887/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19887/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:51.808 [print] {
"resourceType": "MedicationAdministration",
"id": "19887",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:54.909+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX16",
"display": "Plerixafor"
}
]
},
"effectivePeriod": {
"start": "2014-02-20",
"end": "2014-05-16"
}
}
> *
print COOKIES
10:42:51.808 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:52.441 [print] {
"resourceType": "MedicationAdministration",
"id": "19887",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:54.909+02:00",
"source": "#N56MDz5ATgUUEQO1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX16",
"display": "Plerixafor"
}
]
},
"effectivePeriod": {
"start": "2014-02-20",
"end": "2014-05-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:53.078 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 20ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 20ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:53.693 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:42:56.197+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:42:56.197+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:42:53.694 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX41",
"display": "Eribulina"
}
]
},
"effectivePeriod": {
"start": "2014-03-06",
"end": "2014-05-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:54.308 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:54.308 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HxRaNFxdXiOHiSAD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19888/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19888/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:54.308 [print] {
"resourceType": "MedicationAdministration",
"id": "19888",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:57.441+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX41",
"display": "Eribulina"
}
]
},
"effectivePeriod": {
"start": "2014-03-06",
"end": "2014-05-26"
}
}
> *
print COOKIES
10:42:54.308 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:54.309 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:54.309 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HxRaNFxdXiOHiSAD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19888/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:42:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19888/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:42:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:54.309 [print] {
"resourceType": "MedicationAdministration",
"id": "19888",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:57.441+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX41",
"display": "Eribulina"
}
]
},
"effectivePeriod": {
"start": "2014-03-06",
"end": "2014-05-26"
}
}
> *
print COOKIES
10:42:54.309 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:02.343 [print] {
"resourceType": "MedicationAdministration",
"id": "19888",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:42:57.441+02:00",
"source": "#HxRaNFxdXiOHiSAD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX41",
"display": "Eribulina"
}
]
},
"effectivePeriod": {
"start": "2014-03-06",
"end": "2014-05-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:03.961 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:04.556 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:43:07.095+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:43:07.095+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:43:04.557 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC24",
"display": "Daratumumab"
}
]
},
"effectivePeriod": {
"start": "2014-04-08",
"end": "2014-05-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:05.175 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:05.175 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bofaAUObiHDWb7bx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19889/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19889/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:05.176 [print] {
"resourceType": "MedicationAdministration",
"id": "19889",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:08.307+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC24",
"display": "Daratumumab"
}
]
},
"effectivePeriod": {
"start": "2014-04-08",
"end": "2014-05-30"
}
}
> *
print COOKIES
10:43:05.176 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:05.177 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:05.177 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bofaAUObiHDWb7bx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19889/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19889/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:05.177 [print] {
"resourceType": "MedicationAdministration",
"id": "19889",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:08.307+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC24",
"display": "Daratumumab"
}
]
},
"effectivePeriod": {
"start": "2014-04-08",
"end": "2014-05-30"
}
}
> *
print COOKIES
10:43:05.177 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:05.784 [print] {
"resourceType": "MedicationAdministration",
"id": "19889",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:08.307+02:00",
"source": "#bofaAUObiHDWb7bx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC24",
"display": "Daratumumab"
}
]
},
"effectivePeriod": {
"start": "2014-04-08",
"end": "2014-05-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:06.416 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:07.044 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:43:09.547+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:43:09.547+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:43:07.045 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB06",
"display": "Interferone alfa-n1"
}
]
},
"effectivePeriod": {
"start": "2014-05-30",
"end": "2014-07-03"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:07.702 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:07.702 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fcrjYP8ppuIJnIe9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19890/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19890/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:07.702 [print] {
"resourceType": "MedicationAdministration",
"id": "19890",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:10.835+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB06",
"display": "Interferone alfa-n1"
}
]
},
"effectivePeriod": {
"start": "2014-05-30",
"end": "2014-07-03"
}
}
> *
print COOKIES
10:43:07.702 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:07.703 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:07.703 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fcrjYP8ppuIJnIe9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19890/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19890/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:07.703 [print] {
"resourceType": "MedicationAdministration",
"id": "19890",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:10.835+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB06",
"display": "Interferone alfa-n1"
}
]
},
"effectivePeriod": {
"start": "2014-05-30",
"end": "2014-07-03"
}
}
> *
print COOKIES
10:43:07.703 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:08.360 [print] {
"resourceType": "MedicationAdministration",
"id": "19890",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:10.835+02:00",
"source": "#fcrjYP8ppuIJnIe9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB06",
"display": "Interferone alfa-n1"
}
]
},
"effectivePeriod": {
"start": "2014-05-30",
"end": "2014-07-03"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:09.053 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:09.666 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:43:12.182+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:43:12.182+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:43:09.668 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB02",
"display": "Daunorubicina "
}
]
},
"effectivePeriod": {
"start": "2014-06-04",
"end": "2014-08-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:10.265 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"646"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:10.265 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CNtJFnNIQGi3eL6r"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19891/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19891/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:10.265 [print] {
"resourceType": "MedicationAdministration",
"id": "19891",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:13.398+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB02",
"display": "Daunorubicina "
}
]
},
"effectivePeriod": {
"start": "2014-06-04",
"end": "2014-08-26"
}
}
> *
print COOKIES
10:43:10.265 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:10.266 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"646"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:10.266 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CNtJFnNIQGi3eL6r"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19891/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19891/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:10.266 [print] {
"resourceType": "MedicationAdministration",
"id": "19891",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:13.398+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB02",
"display": "Daunorubicina "
}
]
},
"effectivePeriod": {
"start": "2014-06-04",
"end": "2014-08-26"
}
}
> *
print COOKIES
10:43:10.266 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:10.863 [print] {
"resourceType": "MedicationAdministration",
"id": "19891",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:13.398+02:00",
"source": "#CNtJFnNIQGi3eL6r",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB02",
"display": "Daunorubicina "
}
]
},
"effectivePeriod": {
"start": "2014-06-04",
"end": "2014-08-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:11.483 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:12.096 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:43:14.614+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:43:14.614+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:43:12.098 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CC01",
"display": "Demecolcina"
}
]
},
"effectivePeriod": {
"start": "2014-12-04",
"end": "2015-03-06"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:12.720 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:12.720 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mQ9XGZx6fFHt3qy8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19892/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19892/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:12.720 [print] {
"resourceType": "MedicationAdministration",
"id": "19892",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:15.852+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CC01",
"display": "Demecolcina"
}
]
},
"effectivePeriod": {
"start": "2014-12-04",
"end": "2015-03-06"
}
}
> *
print COOKIES
10:43:12.720 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:12.722 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:12.722 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mQ9XGZx6fFHt3qy8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19892/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19892/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:12.722 [print] {
"resourceType": "MedicationAdministration",
"id": "19892",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:15.852+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CC01",
"display": "Demecolcina"
}
]
},
"effectivePeriod": {
"start": "2014-12-04",
"end": "2015-03-06"
}
}
> *
print COOKIES
10:43:12.722 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:13.323 [print] {
"resourceType": "MedicationAdministration",
"id": "19892",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:15.852+02:00",
"source": "#mQ9XGZx6fFHt3qy8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CC01",
"display": "Demecolcina"
}
]
},
"effectivePeriod": {
"start": "2014-12-04",
"end": "2015-03-06"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:14.032 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:14.639 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:43:17.140+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:43:17.140+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:43:14.640 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB06",
"display": "Idarubicina "
}
]
},
"effectivePeriod": {
"start": "2014-12-08",
"end": "2015-03-25"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:15.265 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:15.265 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XzEHNauCmd2JTFtm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19893/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19893/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:15.265 [print] {
"resourceType": "MedicationAdministration",
"id": "19893",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:18.387+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB06",
"display": "Idarubicina "
}
]
},
"effectivePeriod": {
"start": "2014-12-08",
"end": "2015-03-25"
}
}
> *
print COOKIES
10:43:15.265 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:15.266 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:15.266 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XzEHNauCmd2JTFtm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19893/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19893/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:15.266 [print] {
"resourceType": "MedicationAdministration",
"id": "19893",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:18.387+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB06",
"display": "Idarubicina "
}
]
},
"effectivePeriod": {
"start": "2014-12-08",
"end": "2015-03-25"
}
}
> *
print COOKIES
10:43:15.266 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:15.871 [print] {
"resourceType": "MedicationAdministration",
"id": "19893",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:18.387+02:00",
"source": "#XzEHNauCmd2JTFtm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB06",
"display": "Idarubicina "
}
]
},
"effectivePeriod": {
"start": "2014-12-08",
"end": "2015-03-25"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:16.498 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:17.155 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:43:19.634+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:43:19.634+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:43:17.156 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC02",
"display": "Rituximab"
}
]
},
"effectivePeriod": {
"start": "2015-07-30",
"end": "2015-04-13"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:17.748 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:17.748 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VCGDUpW2wORLM6jS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19894/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19894/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:17.748 [print] {
"resourceType": "MedicationAdministration",
"id": "19894",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:20.881+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC02",
"display": "Rituximab"
}
]
},
"effectivePeriod": {
"start": "2015-07-30",
"end": "2015-04-13"
}
}
> *
print COOKIES
10:43:17.748 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:17.750 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:17.750 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VCGDUpW2wORLM6jS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19894/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19894/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:17.750 [print] {
"resourceType": "MedicationAdministration",
"id": "19894",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:20.881+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC02",
"display": "Rituximab"
}
]
},
"effectivePeriod": {
"start": "2015-07-30",
"end": "2015-04-13"
}
}
> *
print COOKIES
10:43:17.750 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:18.344 [print] {
"resourceType": "MedicationAdministration",
"id": "19894",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:20.881+02:00",
"source": "#VCGDUpW2wORLM6jS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC02",
"display": "Rituximab"
}
]
},
"effectivePeriod": {
"start": "2015-07-30",
"end": "2015-04-13"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:18.962 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:19.578 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:43:22.093+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:43:22.093+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:43:19.579 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE15",
"display": "Vemurafenib"
}
]
},
"effectivePeriod": {
"start": "2015-09-01",
"end": "2015-05-19"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:20.199 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:20.199 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"R5fhWrQOYgPzf6aT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19895/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19895/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:20.199 [print] {
"resourceType": "MedicationAdministration",
"id": "19895",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:23.332+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE15",
"display": "Vemurafenib"
}
]
},
"effectivePeriod": {
"start": "2015-09-01",
"end": "2015-05-19"
}
}
> *
print COOKIES
10:43:20.199 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:20.201 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:20.201 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"R5fhWrQOYgPzf6aT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19895/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19895/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:20.201 [print] {
"resourceType": "MedicationAdministration",
"id": "19895",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:23.332+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE15",
"display": "Vemurafenib"
}
]
},
"effectivePeriod": {
"start": "2015-09-01",
"end": "2015-05-19"
}
}
> *
print COOKIES
10:43:20.201 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:20.848 [print] {
"resourceType": "MedicationAdministration",
"id": "19895",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:23.332+02:00",
"source": "#R5fhWrQOYgPzf6aT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE15",
"display": "Vemurafenib"
}
]
},
"effectivePeriod": {
"start": "2015-09-01",
"end": "2015-05-19"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:21.467 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:22.087 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:43:24.600+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:43:24.600+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:43:22.088 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX35",
"display": "Anagrelide "
}
]
},
"effectivePeriod": {
"start": "2015-09-29",
"end": "2015-06-22"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:22.759 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:22.759 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wQfkHec7epzPmPbt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19896/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19896/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:22.759 [print] {
"resourceType": "MedicationAdministration",
"id": "19896",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:25.874+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX35",
"display": "Anagrelide "
}
]
},
"effectivePeriod": {
"start": "2015-09-29",
"end": "2015-06-22"
}
}
> *
print COOKIES
10:43:22.759 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:22.761 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:22.761 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wQfkHec7epzPmPbt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19896/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19896/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:22.761 [print] {
"resourceType": "MedicationAdministration",
"id": "19896",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:25.874+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX35",
"display": "Anagrelide "
}
]
},
"effectivePeriod": {
"start": "2015-09-29",
"end": "2015-06-22"
}
}
> *
print COOKIES
10:43:22.761 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:23.433 [print] {
"resourceType": "MedicationAdministration",
"id": "19896",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:25.874+02:00",
"source": "#wQfkHec7epzPmPbt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX35",
"display": "Anagrelide "
}
]
},
"effectivePeriod": {
"start": "2015-09-29",
"end": "2015-06-22"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:24.168 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:24.789 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:43:27.297+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:43:27.297+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:43:24.790 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA03",
"display": "Fulvestrant"
}
]
},
"effectivePeriod": {
"start": "2016-05-11",
"end": "2015-11-18"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:25.473 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:25.473 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QwMQrsJal6hGU3IL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19897/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19897/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:25.473 [print] {
"resourceType": "MedicationAdministration",
"id": "19897",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:28.606+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA03",
"display": "Fulvestrant"
}
]
},
"effectivePeriod": {
"start": "2016-05-11",
"end": "2015-11-18"
}
}
> *
print COOKIES
10:43:25.473 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:25.475 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:25.475 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QwMQrsJal6hGU3IL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19897/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19897/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:25.475 [print] {
"resourceType": "MedicationAdministration",
"id": "19897",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:28.606+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA03",
"display": "Fulvestrant"
}
]
},
"effectivePeriod": {
"start": "2016-05-11",
"end": "2015-11-18"
}
}
> *
print COOKIES
10:43:25.475 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:26.085 [print] {
"resourceType": "MedicationAdministration",
"id": "19897",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:28.606+02:00",
"source": "#QwMQrsJal6hGU3IL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02BA03",
"display": "Fulvestrant"
}
]
},
"effectivePeriod": {
"start": "2016-05-11",
"end": "2015-11-18"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:27.470 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:28.129 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:43:30.601+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:43:30.601+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:43:28.132 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC07",
"display": "Azacitidina"
}
]
},
"effectivePeriod": {
"start": "2016-09-02",
"end": "2016-02-01"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:28.810 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:28.810 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AVsYn40Ncqyn0GNl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19898/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19898/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:28.810 [print] {
"resourceType": "MedicationAdministration",
"id": "19898",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:31.933+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC07",
"display": "Azacitidina"
}
]
},
"effectivePeriod": {
"start": "2016-09-02",
"end": "2016-02-01"
}
}
> *
print COOKIES
10:43:28.810 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:28.813 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:28.813 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AVsYn40Ncqyn0GNl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19898/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19898/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:28.813 [print] {
"resourceType": "MedicationAdministration",
"id": "19898",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:31.933+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC07",
"display": "Azacitidina"
}
]
},
"effectivePeriod": {
"start": "2016-09-02",
"end": "2016-02-01"
}
}
> *
print COOKIES
10:43:28.813 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:29.439 [print] {
"resourceType": "MedicationAdministration",
"id": "19898",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:31.933+02:00",
"source": "#AVsYn40Ncqyn0GNl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC07",
"display": "Azacitidina"
}
]
},
"effectivePeriod": {
"start": "2016-09-02",
"end": "2016-02-01"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:30.066 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:30.687 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:43:33.196+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:43:33.196+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:43:30.687 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA03",
"display": "Melphalan"
}
]
},
"effectivePeriod": {
"start": "2017-02-22",
"end": "2016-02-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:31.312 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:31.312 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"C398Q1imSvnfplde"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19899/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19899/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:31.313 [print] {
"resourceType": "MedicationAdministration",
"id": "19899",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:34.445+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA03",
"display": "Melphalan"
}
]
},
"effectivePeriod": {
"start": "2017-02-22",
"end": "2016-02-23"
}
}
> *
print COOKIES
10:43:31.313 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:31.314 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:31.314 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"C398Q1imSvnfplde"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19899/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19899/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:31.314 [print] {
"resourceType": "MedicationAdministration",
"id": "19899",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:34.445+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA03",
"display": "Melphalan"
}
]
},
"effectivePeriod": {
"start": "2017-02-22",
"end": "2016-02-23"
}
}
> *
print COOKIES
10:43:31.314 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:31.928 [print] {
"resourceType": "MedicationAdministration",
"id": "19899",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:34.445+02:00",
"source": "#C398Q1imSvnfplde",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA03",
"display": "Melphalan"
}
]
},
"effectivePeriod": {
"start": "2017-02-22",
"end": "2016-02-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:32.567 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:33.200 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:43:35.684+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:43:35.684+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:43:33.201 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA15",
"display": "Alefacept"
}
]
},
"effectivePeriod": {
"start": "2017-03-21",
"end": "2016-03-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:33.828 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:33.828 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AJN7VOMSDhbvZrs2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19900/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19900/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:33.828 [print] {
"resourceType": "MedicationAdministration",
"id": "19900",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:36.960+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA15",
"display": "Alefacept"
}
]
},
"effectivePeriod": {
"start": "2017-03-21",
"end": "2016-03-29"
}
}
> *
print COOKIES
10:43:33.828 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:33.830 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:33.830 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AJN7VOMSDhbvZrs2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19900/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19900/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:33.830 [print] {
"resourceType": "MedicationAdministration",
"id": "19900",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:36.960+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA15",
"display": "Alefacept"
}
]
},
"effectivePeriod": {
"start": "2017-03-21",
"end": "2016-03-29"
}
}
> *
print COOKIES
10:43:33.830 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:34.433 [print] {
"resourceType": "MedicationAdministration",
"id": "19900",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:36.960+02:00",
"source": "#AJN7VOMSDhbvZrs2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA15",
"display": "Alefacept"
}
]
},
"effectivePeriod": {
"start": "2017-03-21",
"end": "2016-03-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:35.052 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:35.663 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:43:38.184+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:43:38.184+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:43:35.664 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA23",
"display": "Natalizumab"
}
]
},
"effectivePeriod": {
"start": "2017-04-14",
"end": "2016-04-14"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:36.308 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:36.308 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PAZmlCH08Xy3OK5W"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19901/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19901/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:36.308 [print] {
"resourceType": "MedicationAdministration",
"id": "19901",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:39.434+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA23",
"display": "Natalizumab"
}
]
},
"effectivePeriod": {
"start": "2017-04-14",
"end": "2016-04-14"
}
}
> *
print COOKIES
10:43:36.308 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:36.309 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:36.309 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PAZmlCH08Xy3OK5W"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19901/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19901/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:36.309 [print] {
"resourceType": "MedicationAdministration",
"id": "19901",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:39.434+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA23",
"display": "Natalizumab"
}
]
},
"effectivePeriod": {
"start": "2017-04-14",
"end": "2016-04-14"
}
}
> *
print COOKIES
10:43:36.309 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:36.935 [print] {
"resourceType": "MedicationAdministration",
"id": "19901",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:39.434+02:00",
"source": "#PAZmlCH08Xy3OK5W",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA23",
"display": "Natalizumab"
}
]
},
"effectivePeriod": {
"start": "2017-04-14",
"end": "2016-04-14"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:37.588 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:38.197 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:43:40.720+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:43:40.720+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:43:38.198 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AA04",
"display": "Fosfestrolo"
}
]
},
"effectivePeriod": {
"start": "2017-06-19",
"end": "2016-07-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:38.830 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:38.830 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yscnuJXFZJMKQSNK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19902/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19902/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:38.830 [print] {
"resourceType": "MedicationAdministration",
"id": "19902",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:41.951+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AA04",
"display": "Fosfestrolo"
}
]
},
"effectivePeriod": {
"start": "2017-06-19",
"end": "2016-07-11"
}
}
> *
print COOKIES
10:43:38.830 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:38.834 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:38.834 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yscnuJXFZJMKQSNK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19902/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19902/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:38.834 [print] {
"resourceType": "MedicationAdministration",
"id": "19902",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:41.951+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AA04",
"display": "Fosfestrolo"
}
]
},
"effectivePeriod": {
"start": "2017-06-19",
"end": "2016-07-11"
}
}
> *
print COOKIES
10:43:38.834 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:39.426 [print] {
"resourceType": "MedicationAdministration",
"id": "19902",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:41.951+02:00",
"source": "#yscnuJXFZJMKQSNK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AA04",
"display": "Fosfestrolo"
}
]
},
"effectivePeriod": {
"start": "2017-06-19",
"end": "2016-07-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:40.029 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:40.755 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:43:43.164+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:43:43.164+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:43:40.757 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC03",
"display": "Tegafur"
}
]
},
"effectivePeriod": {
"start": "2017-09-19",
"end": "2017-03-22"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:41.391 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"636"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:41.391 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BZtFDDLGhFOEsI7j"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19903/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19903/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:41.391 [print] {
"resourceType": "MedicationAdministration",
"id": "19903",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:44.519+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC03",
"display": "Tegafur"
}
]
},
"effectivePeriod": {
"start": "2017-09-19",
"end": "2017-03-22"
}
}
> *
print COOKIES
10:43:41.391 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:41.394 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"636"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:41.394 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BZtFDDLGhFOEsI7j"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19903/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19903/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:41.394 [print] {
"resourceType": "MedicationAdministration",
"id": "19903",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:44.519+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC03",
"display": "Tegafur"
}
]
},
"effectivePeriod": {
"start": "2017-09-19",
"end": "2017-03-22"
}
}
> *
print COOKIES
10:43:41.394 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:41.999 [print] {
"resourceType": "MedicationAdministration",
"id": "19903",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:44.519+02:00",
"source": "#BZtFDDLGhFOEsI7j",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC03",
"display": "Tegafur"
}
]
},
"effectivePeriod": {
"start": "2017-09-19",
"end": "2017-03-22"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:42.644 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:43.310 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:43:45.765+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:43:45.765+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:43:43.311 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE29",
"display": "Lenvatinib"
}
]
},
"effectivePeriod": {
"start": "2017-11-09",
"end": "2017-07-10"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:43.948 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:43.948 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6bVTOt0hIVISVyKL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19904/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19904/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:43.948 [print] {
"resourceType": "MedicationAdministration",
"id": "19904",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:47.079+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE29",
"display": "Lenvatinib"
}
]
},
"effectivePeriod": {
"start": "2017-11-09",
"end": "2017-07-10"
}
}
> *
print COOKIES
10:43:43.948 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:43.950 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:43.950 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6bVTOt0hIVISVyKL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19904/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19904/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:43.950 [print] {
"resourceType": "MedicationAdministration",
"id": "19904",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:47.079+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE29",
"display": "Lenvatinib"
}
]
},
"effectivePeriod": {
"start": "2017-11-09",
"end": "2017-07-10"
}
}
> *
print COOKIES
10:43:43.950 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:44.566 [print] {
"resourceType": "MedicationAdministration",
"id": "19904",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:47.079+02:00",
"source": "#6bVTOt0hIVISVyKL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE29",
"display": "Lenvatinib"
}
]
},
"effectivePeriod": {
"start": "2017-11-09",
"end": "2017-07-10"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:45.191 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:45.786 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:43:48.322+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:43:48.322+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:43:45.787 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA03",
"display": "Vindesina "
}
]
},
"effectivePeriod": {
"start": "2017-11-24",
"end": "2017-09-18"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:46.606 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:46.606 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sSFDXcHjDk36jsyv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19905/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19905/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:46.606 [print] {
"resourceType": "MedicationAdministration",
"id": "19905",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:49.739+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA03",
"display": "Vindesina "
}
]
},
"effectivePeriod": {
"start": "2017-11-24",
"end": "2017-09-18"
}
}
> *
print COOKIES
10:43:46.606 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:46.607 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:46.607 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sSFDXcHjDk36jsyv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19905/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19905/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:46.607 [print] {
"resourceType": "MedicationAdministration",
"id": "19905",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:49.739+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA03",
"display": "Vindesina "
}
]
},
"effectivePeriod": {
"start": "2017-11-24",
"end": "2017-09-18"
}
}
> *
print COOKIES
10:43:46.607 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:47.307 [print] {
"resourceType": "MedicationAdministration",
"id": "19905",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:49.739+02:00",
"source": "#sSFDXcHjDk36jsyv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA03",
"display": "Vindesina "
}
]
},
"effectivePeriod": {
"start": "2017-11-24",
"end": "2017-09-18"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:47.959 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:48.571 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:43:51.090+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:43:51.090+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:43:48.572 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA10",
"display": "Sirolimus"
}
]
},
"effectivePeriod": {
"start": "2017-12-20",
"end": "2017-12-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:49.282 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:49.282 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CD70pY41pnHsQxmS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19906/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19906/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:49.282 [print] {
"resourceType": "MedicationAdministration",
"id": "19906",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:52.403+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA10",
"display": "Sirolimus"
}
]
},
"effectivePeriod": {
"start": "2017-12-20",
"end": "2017-12-27"
}
}
> *
print COOKIES
10:43:49.282 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:49.284 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:49.284 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CD70pY41pnHsQxmS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19906/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19906/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:49.284 [print] {
"resourceType": "MedicationAdministration",
"id": "19906",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:52.403+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA10",
"display": "Sirolimus"
}
]
},
"effectivePeriod": {
"start": "2017-12-20",
"end": "2017-12-27"
}
}
> *
print COOKIES
10:43:49.284 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:49.894 [print] {
"resourceType": "MedicationAdministration",
"id": "19906",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:52.403+02:00",
"source": "#CD70pY41pnHsQxmS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA10",
"display": "Sirolimus"
}
]
},
"effectivePeriod": {
"start": "2017-12-20",
"end": "2017-12-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:50.509 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:51.104 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:43:53.643+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:43:53.643+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:43:51.105 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX07",
"display": "Poly I:C"
}
]
},
"effectivePeriod": {
"start": "2012-10-18",
"end": "2012-09-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:51.737 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:51.737 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uL9DXsXbR4kpJAPv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19907/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19907/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:51.737 [print] {
"resourceType": "MedicationAdministration",
"id": "19907",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:54.863+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX07",
"display": "Poly I:C"
}
]
},
"effectivePeriod": {
"start": "2012-10-18",
"end": "2012-09-26"
}
}
> *
print COOKIES
10:43:51.737 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:51.739 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:51.739 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uL9DXsXbR4kpJAPv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19907/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19907/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:51.739 [print] {
"resourceType": "MedicationAdministration",
"id": "19907",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:54.863+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX07",
"display": "Poly I:C"
}
]
},
"effectivePeriod": {
"start": "2012-10-18",
"end": "2012-09-26"
}
}
> *
print COOKIES
10:43:51.739 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:52.361 [print] {
"resourceType": "MedicationAdministration",
"id": "19907",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:54.863+02:00",
"source": "#uL9DXsXbR4kpJAPv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX07",
"display": "Poly I:C"
}
]
},
"effectivePeriod": {
"start": "2012-10-18",
"end": "2012-09-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:52.987 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:53.614 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:43:56.120+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:43:56.120+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:43:53.615 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX05",
"display": "Pirfenidone"
}
]
},
"effectivePeriod": {
"start": "2012-10-26",
"end": "2012-11-07"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:54.219 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:54.219 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KXXfr3M87g56DcJf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19908/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19908/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:54.219 [print] {
"resourceType": "MedicationAdministration",
"id": "19908",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:57.349+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX05",
"display": "Pirfenidone"
}
]
},
"effectivePeriod": {
"start": "2012-10-26",
"end": "2012-11-07"
}
}
> *
print COOKIES
10:43:54.219 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:54.221 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:54.221 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KXXfr3M87g56DcJf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19908/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19908/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:54.221 [print] {
"resourceType": "MedicationAdministration",
"id": "19908",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:57.349+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX05",
"display": "Pirfenidone"
}
]
},
"effectivePeriod": {
"start": "2012-10-26",
"end": "2012-11-07"
}
}
> *
print COOKIES
10:43:54.221 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:54.818 [print] {
"resourceType": "MedicationAdministration",
"id": "19908",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:57.349+02:00",
"source": "#KXXfr3M87g56DcJf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX05",
"display": "Pirfenidone"
}
]
},
"effectivePeriod": {
"start": "2012-10-26",
"end": "2012-11-07"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:55.418 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:56.039 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:43:58.548+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:43:58.548+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:43:56.040 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX01",
"display": "Lentinan"
}
]
},
"effectivePeriod": {
"start": "2012-12-21",
"end": "2012-11-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:56.663 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:56.663 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"y9DTpcXlAfm9bupX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19909/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19909/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:56.663 [print] {
"resourceType": "MedicationAdministration",
"id": "19909",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:59.796+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX01",
"display": "Lentinan"
}
]
},
"effectivePeriod": {
"start": "2012-12-21",
"end": "2012-11-29"
}
}
> *
print COOKIES
10:43:56.663 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:56.665 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:56.665 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"y9DTpcXlAfm9bupX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19909/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:43:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19909/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:43:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:56.665 [print] {
"resourceType": "MedicationAdministration",
"id": "19909",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:59.796+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX01",
"display": "Lentinan"
}
]
},
"effectivePeriod": {
"start": "2012-12-21",
"end": "2012-11-29"
}
}
> *
print COOKIES
10:43:56.665 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:57.315 [print] {
"resourceType": "MedicationAdministration",
"id": "19909",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:43:59.796+02:00",
"source": "#y9DTpcXlAfm9bupX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX01",
"display": "Lentinan"
}
]
},
"effectivePeriod": {
"start": "2012-12-21",
"end": "2012-11-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:58.157 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:58.878 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:01.287+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:01.287+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:43:58.879 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB05",
"display": "Fludarabina "
}
]
},
"effectivePeriod": {
"start": "2013-02-18",
"end": "2012-12-13"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:59.543 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:59.545 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Bq8xCG369vyOlpwb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19910/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19910/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:59.545 [print] {
"resourceType": "MedicationAdministration",
"id": "19910",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:02.677+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB05",
"display": "Fludarabina "
}
]
},
"effectivePeriod": {
"start": "2013-02-18",
"end": "2012-12-13"
}
}
> *
print COOKIES
10:43:59.545 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:59.546 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:59.546 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Bq8xCG369vyOlpwb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19910/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19910/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:59.546 [print] {
"resourceType": "MedicationAdministration",
"id": "19910",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:02.677+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB05",
"display": "Fludarabina "
}
]
},
"effectivePeriod": {
"start": "2013-02-18",
"end": "2012-12-13"
}
}
> *
print COOKIES
10:43:59.546 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:00.153 [print] {
"resourceType": "MedicationAdministration",
"id": "19910",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:02.677+02:00",
"source": "#Bq8xCG369vyOlpwb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB05",
"display": "Fludarabina "
}
]
},
"effectivePeriod": {
"start": "2013-02-18",
"end": "2012-12-13"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:00.758 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:01.385 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:03.893+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:03.893+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:01.386 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC11",
"display": "Ipilimumab"
}
]
},
"effectivePeriod": {
"start": "2013-11-04",
"end": "2013-03-01"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:02.011 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:02.011 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HAS0DC9xLs5y3jhN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19911/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19911/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:02.011 [print] {
"resourceType": "MedicationAdministration",
"id": "19911",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:05.143+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC11",
"display": "Ipilimumab"
}
]
},
"effectivePeriod": {
"start": "2013-11-04",
"end": "2013-03-01"
}
}
> *
print COOKIES
10:44:02.011 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:02.014 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:02.014 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HAS0DC9xLs5y3jhN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19911/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19911/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:02.014 [print] {
"resourceType": "MedicationAdministration",
"id": "19911",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:05.143+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC11",
"display": "Ipilimumab"
}
]
},
"effectivePeriod": {
"start": "2013-11-04",
"end": "2013-03-01"
}
}
> *
print COOKIES
10:44:02.014 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:02.761 [print] {
"resourceType": "MedicationAdministration",
"id": "19911",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:05.143+02:00",
"source": "#HAS0DC9xLs5y3jhN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC11",
"display": "Ipilimumab"
}
]
},
"effectivePeriod": {
"start": "2013-11-04",
"end": "2013-03-01"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:03.364 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:04.170 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:06.499+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:06.499+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:04.171 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA05",
"display": "Mecloretamina"
}
]
},
"effectivePeriod": {
"start": "2013-11-25",
"end": "2013-06-12"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:04.787 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:04.787 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ov0DK7P2dXBLVXI9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19912/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19912/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:04.787 [print] {
"resourceType": "MedicationAdministration",
"id": "19912",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:07.919+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA05",
"display": "Mecloretamina"
}
]
},
"effectivePeriod": {
"start": "2013-11-25",
"end": "2013-06-12"
}
}
> *
print COOKIES
10:44:04.787 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:04.789 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:04.789 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ov0DK7P2dXBLVXI9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19912/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19912/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:04.789 [print] {
"resourceType": "MedicationAdministration",
"id": "19912",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:07.919+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA05",
"display": "Mecloretamina"
}
]
},
"effectivePeriod": {
"start": "2013-11-25",
"end": "2013-06-12"
}
}
> *
print COOKIES
10:44:04.789 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:05.400 [print] {
"resourceType": "MedicationAdministration",
"id": "19912",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:07.919+02:00",
"source": "#Ov0DK7P2dXBLVXI9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AA05",
"display": "Mecloretamina"
}
]
},
"effectivePeriod": {
"start": "2013-11-25",
"end": "2013-06-12"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:06.059 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:06.672 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:09.189+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:09.189+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:06.673 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC27",
"display": "Olaratumab"
}
]
},
"effectivePeriod": {
"start": "2014-01-17",
"end": "2013-07-25"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:07.349 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:07.349 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xPFl6OnGQ4rMuBIa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19913/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19913/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:07.349 [print] {
"resourceType": "MedicationAdministration",
"id": "19913",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:10.476+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC27",
"display": "Olaratumab"
}
]
},
"effectivePeriod": {
"start": "2014-01-17",
"end": "2013-07-25"
}
}
> *
print COOKIES
10:44:07.349 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:07.350 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:07.350 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xPFl6OnGQ4rMuBIa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19913/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19913/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:07.350 [print] {
"resourceType": "MedicationAdministration",
"id": "19913",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:10.476+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC27",
"display": "Olaratumab"
}
]
},
"effectivePeriod": {
"start": "2014-01-17",
"end": "2013-07-25"
}
}
> *
print COOKIES
10:44:07.350 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:08.989 [print] {
"resourceType": "MedicationAdministration",
"id": "19913",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:10.476+02:00",
"source": "#xPFl6OnGQ4rMuBIa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC27",
"display": "Olaratumab"
}
]
},
"effectivePeriod": {
"start": "2014-01-17",
"end": "2013-07-25"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:09.596 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:10.233 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:12.725+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:12.725+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:10.233 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC53",
"display": "Tegafur + gimeracil + oteracil "
}
]
},
"effectivePeriod": {
"start": "2014-06-03",
"end": "2013-09-30"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:10.872 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"660"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:10.872 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wKSXqSGJtvlZD3db"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19914/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19914/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:10.872 [print] {
"resourceType": "MedicationAdministration",
"id": "19914",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:13.992+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC53",
"display": "Tegafur + gimeracil + oteracil "
}
]
},
"effectivePeriod": {
"start": "2014-06-03",
"end": "2013-09-30"
}
}
> *
print COOKIES
10:44:10.872 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:10.873 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"660"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:10.873 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wKSXqSGJtvlZD3db"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19914/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19914/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:10.873 [print] {
"resourceType": "MedicationAdministration",
"id": "19914",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:13.992+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC53",
"display": "Tegafur + gimeracil + oteracil "
}
]
},
"effectivePeriod": {
"start": "2014-06-03",
"end": "2013-09-30"
}
}
> *
print COOKIES
10:44:10.873 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:11.480 [print] {
"resourceType": "MedicationAdministration",
"id": "19914",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:13.992+02:00",
"source": "#wKSXqSGJtvlZD3db",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC53",
"display": "Tegafur + gimeracil + oteracil "
}
]
},
"effectivePeriod": {
"start": "2014-06-03",
"end": "2013-09-30"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:12.147 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:12.773 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:15.276+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:15.276+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:12.775 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA05",
"display": "Polyplatfllen"
}
]
},
"effectivePeriod": {
"start": "2014-12-23",
"end": "2013-10-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:13.373 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:13.373 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vuXxsNuiLdxfdqkW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19915/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19915/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:13.373 [print] {
"resourceType": "MedicationAdministration",
"id": "19915",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:16.508+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA05",
"display": "Polyplatfllen"
}
]
},
"effectivePeriod": {
"start": "2014-12-23",
"end": "2013-10-17"
}
}
> *
print COOKIES
10:44:13.373 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:13.375 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:13.375 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vuXxsNuiLdxfdqkW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19915/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19915/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:13.375 [print] {
"resourceType": "MedicationAdministration",
"id": "19915",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:16.508+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA05",
"display": "Polyplatfllen"
}
]
},
"effectivePeriod": {
"start": "2014-12-23",
"end": "2013-10-17"
}
}
> *
print COOKIES
10:44:13.375 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:14.008 [print] {
"resourceType": "MedicationAdministration",
"id": "19915",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:16.508+02:00",
"source": "#vuXxsNuiLdxfdqkW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA05",
"display": "Polyplatfllen"
}
]
},
"effectivePeriod": {
"start": "2014-12-23",
"end": "2013-10-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:14.645 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:15.255 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:17.780+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:17.780+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:15.257 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB04",
"display": "Aclarubicina"
}
]
},
"effectivePeriod": {
"start": "2015-03-12",
"end": "2014-02-18"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:15.897 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:15.897 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8geZUoalR7wuDMYs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19916/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19916/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:15.897 [print] {
"resourceType": "MedicationAdministration",
"id": "19916",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:19.012+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB04",
"display": "Aclarubicina"
}
]
},
"effectivePeriod": {
"start": "2015-03-12",
"end": "2014-02-18"
}
}
> *
print COOKIES
10:44:15.897 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:15.899 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:15.899 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8geZUoalR7wuDMYs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19916/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19916/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:15.899 [print] {
"resourceType": "MedicationAdministration",
"id": "19916",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:19.012+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB04",
"display": "Aclarubicina"
}
]
},
"effectivePeriod": {
"start": "2015-03-12",
"end": "2014-02-18"
}
}
> *
print COOKIES
10:44:15.899 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:16.516 [print] {
"resourceType": "MedicationAdministration",
"id": "19916",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:19.012+02:00",
"source": "#8geZUoalR7wuDMYs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB04",
"display": "Aclarubicina"
}
]
},
"effectivePeriod": {
"start": "2015-03-12",
"end": "2014-02-18"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:17.111 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:17.737 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:20.245+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:20.245+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:17.739 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX09",
"display": "Thimopentin"
}
]
},
"effectivePeriod": {
"start": "2015-05-26",
"end": "2014-07-08"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:18.346 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:18.346 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wmxW2PI8yxvC27TY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19917/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19917/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:18.346 [print] {
"resourceType": "MedicationAdministration",
"id": "19917",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:21.464+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX09",
"display": "Thimopentin"
}
]
},
"effectivePeriod": {
"start": "2015-05-26",
"end": "2014-07-08"
}
}
> *
print COOKIES
10:44:18.346 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:18.347 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:18.347 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wmxW2PI8yxvC27TY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19917/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19917/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:18.347 [print] {
"resourceType": "MedicationAdministration",
"id": "19917",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:21.464+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX09",
"display": "Thimopentin"
}
]
},
"effectivePeriod": {
"start": "2015-05-26",
"end": "2014-07-08"
}
}
> *
print COOKIES
10:44:18.347 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:18.964 [print] {
"resourceType": "MedicationAdministration",
"id": "19917",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:21.464+02:00",
"source": "#wmxW2PI8yxvC27TY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX09",
"display": "Thimopentin"
}
]
},
"effectivePeriod": {
"start": "2015-05-26",
"end": "2014-07-08"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:19.592 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:20.407 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:22.726+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:22.726+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:20.408 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX32",
"display": "Bortezomib"
}
]
},
"effectivePeriod": {
"start": "2016-04-27",
"end": "2014-07-09"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:21.043 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:21.043 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GHEviVVuEYbPocdS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19918/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19918/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:21.043 [print] {
"resourceType": "MedicationAdministration",
"id": "19918",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:24.172+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX32",
"display": "Bortezomib"
}
]
},
"effectivePeriod": {
"start": "2016-04-27",
"end": "2014-07-09"
}
}
> *
print COOKIES
10:44:21.043 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:21.044 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:21.044 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GHEviVVuEYbPocdS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19918/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19918/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:21.045 [print] {
"resourceType": "MedicationAdministration",
"id": "19918",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:24.172+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX32",
"display": "Bortezomib"
}
]
},
"effectivePeriod": {
"start": "2016-04-27",
"end": "2014-07-09"
}
}
> *
print COOKIES
10:44:21.045 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:21.658 [print] {
"resourceType": "MedicationAdministration",
"id": "19918",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:24.172+02:00",
"source": "#GHEviVVuEYbPocdS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX32",
"display": "Bortezomib"
}
]
},
"effectivePeriod": {
"start": "2016-04-27",
"end": "2014-07-09"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:22.273 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:22.883 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:25.398+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:25.398+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:22.885 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX04",
"display": "Pegademase"
}
]
},
"effectivePeriod": {
"start": "2016-07-06",
"end": "2014-10-06"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:23.506 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:23.506 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qyETcvAhokw86Lux"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19919/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19919/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:23.506 [print] {
"resourceType": "MedicationAdministration",
"id": "19919",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:26.636+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX04",
"display": "Pegademase"
}
]
},
"effectivePeriod": {
"start": "2016-07-06",
"end": "2014-10-06"
}
}
> *
print COOKIES
10:44:23.506 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:23.507 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:23.508 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qyETcvAhokw86Lux"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19919/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19919/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:23.508 [print] {
"resourceType": "MedicationAdministration",
"id": "19919",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:26.636+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX04",
"display": "Pegademase"
}
]
},
"effectivePeriod": {
"start": "2016-07-06",
"end": "2014-10-06"
}
}
> *
print COOKIES
10:44:23.508 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:24.125 [print] {
"resourceType": "MedicationAdministration",
"id": "19919",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:26.636+02:00",
"source": "#qyETcvAhokw86Lux",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX04",
"display": "Pegademase"
}
]
},
"effectivePeriod": {
"start": "2016-07-06",
"end": "2014-10-06"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:24.762 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 17ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 17ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:25.365 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:27.884+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:27.884+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:25.367 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA02",
"display": "Carboplatino"
}
]
},
"effectivePeriod": {
"start": "2016-08-11",
"end": "2014-10-21"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:26.014 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:26.014 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6x2itg31s5ZkxNhH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19920/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19920/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:26.014 [print] {
"resourceType": "MedicationAdministration",
"id": "19920",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:29.145+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA02",
"display": "Carboplatino"
}
]
},
"effectivePeriod": {
"start": "2016-08-11",
"end": "2014-10-21"
}
}
> *
print COOKIES
10:44:26.014 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:26.016 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:26.016 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6x2itg31s5ZkxNhH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19920/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19920/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:26.016 [print] {
"resourceType": "MedicationAdministration",
"id": "19920",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:29.145+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA02",
"display": "Carboplatino"
}
]
},
"effectivePeriod": {
"start": "2016-08-11",
"end": "2014-10-21"
}
}
> *
print COOKIES
10:44:26.016 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:26.636 [print] {
"resourceType": "MedicationAdministration",
"id": "19920",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:29.145+02:00",
"source": "#6x2itg31s5ZkxNhH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA02",
"display": "Carboplatino"
}
]
},
"effectivePeriod": {
"start": "2016-08-11",
"end": "2014-10-21"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:27.311 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:27.923 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:30.437+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:30.437+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:27.927 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB04",
"display": "Cladribina"
}
]
},
"effectivePeriod": {
"start": "2016-09-19",
"end": "2015-02-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:28.533 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:28.533 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"J4mq09RbdNoL0Z2h"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19921/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19921/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:28.533 [print] {
"resourceType": "MedicationAdministration",
"id": "19921",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:31.662+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB04",
"display": "Cladribina"
}
]
},
"effectivePeriod": {
"start": "2016-09-19",
"end": "2015-02-16"
}
}
> *
print COOKIES
10:44:28.533 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:28.535 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:28.535 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"J4mq09RbdNoL0Z2h"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19921/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19921/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:28.535 [print] {
"resourceType": "MedicationAdministration",
"id": "19921",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:31.662+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB04",
"display": "Cladribina"
}
]
},
"effectivePeriod": {
"start": "2016-09-19",
"end": "2015-02-16"
}
}
> *
print COOKIES
10:44:28.535 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:29.174 [print] {
"resourceType": "MedicationAdministration",
"id": "19921",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:31.662+02:00",
"source": "#J4mq09RbdNoL0Z2h",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB04",
"display": "Cladribina"
}
]
},
"effectivePeriod": {
"start": "2016-09-19",
"end": "2015-02-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:29.802 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:30.419 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:32.930+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:32.930+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:30.420 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX04",
"display": "Lenalidomide"
}
]
},
"effectivePeriod": {
"start": "2016-10-04",
"end": "2015-02-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:31.061 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:31.061 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fxRouRk1Snv6b2qA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19922/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19922/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:31.061 [print] {
"resourceType": "MedicationAdministration",
"id": "19922",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:34.197+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX04",
"display": "Lenalidomide"
}
]
},
"effectivePeriod": {
"start": "2016-10-04",
"end": "2015-02-27"
}
}
> *
print COOKIES
10:44:31.061 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:31.063 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:31.063 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fxRouRk1Snv6b2qA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19922/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19922/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:31.063 [print] {
"resourceType": "MedicationAdministration",
"id": "19922",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:34.197+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX04",
"display": "Lenalidomide"
}
]
},
"effectivePeriod": {
"start": "2016-10-04",
"end": "2015-02-27"
}
}
> *
print COOKIES
10:44:31.063 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:31.676 [print] {
"resourceType": "MedicationAdministration",
"id": "19922",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:34.197+02:00",
"source": "#fxRouRk1Snv6b2qA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX04",
"display": "Lenalidomide"
}
]
},
"effectivePeriod": {
"start": "2016-10-04",
"end": "2015-02-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:32.309 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:32.948 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:35.443+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:35.443+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:32.949 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX10",
"display": "Immunocianina"
}
]
},
"effectivePeriod": {
"start": "2016-12-23",
"end": "2015-07-10"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:33.568 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:33.568 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rZXEbbZodO92pgGr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19923/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19923/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:33.568 [print] {
"resourceType": "MedicationAdministration",
"id": "19923",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:36.703+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX10",
"display": "Immunocianina"
}
]
},
"effectivePeriod": {
"start": "2016-12-23",
"end": "2015-07-10"
}
}
> *
print COOKIES
10:44:33.568 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:33.569 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:33.569 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rZXEbbZodO92pgGr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19923/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19923/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:33.569 [print] {
"resourceType": "MedicationAdministration",
"id": "19923",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:36.703+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX10",
"display": "Immunocianina"
}
]
},
"effectivePeriod": {
"start": "2016-12-23",
"end": "2015-07-10"
}
}
> *
print COOKIES
10:44:33.569 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:34.179 [print] {
"resourceType": "MedicationAdministration",
"id": "19923",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:36.703+02:00",
"source": "#rZXEbbZodO92pgGr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX10",
"display": "Immunocianina"
}
]
},
"effectivePeriod": {
"start": "2016-12-23",
"end": "2015-07-10"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:34.811 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:35.439 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:37.944+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:37.944+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:35.441 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC03",
"display": "Carboquone"
}
]
},
"effectivePeriod": {
"start": "2017-03-16",
"end": "2015-07-27"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:36.072 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:36.072 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zcAPobS52zvprMjj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19924/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19924/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:36.072 [print] {
"resourceType": "MedicationAdministration",
"id": "19924",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:39.193+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC03",
"display": "Carboquone"
}
]
},
"effectivePeriod": {
"start": "2017-03-16",
"end": "2015-07-27"
}
}
> *
print COOKIES
10:44:36.072 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:36.073 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:36.073 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zcAPobS52zvprMjj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19924/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19924/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:36.073 [print] {
"resourceType": "MedicationAdministration",
"id": "19924",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:39.193+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC03",
"display": "Carboquone"
}
]
},
"effectivePeriod": {
"start": "2017-03-16",
"end": "2015-07-27"
}
}
> *
print COOKIES
10:44:36.073 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:36.696 [print] {
"resourceType": "MedicationAdministration",
"id": "19924",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:39.193+02:00",
"source": "#zcAPobS52zvprMjj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AC03",
"display": "Carboquone"
}
]
},
"effectivePeriod": {
"start": "2017-03-16",
"end": "2015-07-27"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:37.328 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:37.928 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:40.463+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:40.463+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:37.929 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC06",
"display": "Capecitabina"
}
]
},
"effectivePeriod": {
"start": "2017-06-06",
"end": "2015-10-01"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:38.570 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:38.570 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cVIk3Tphdjl4MCzS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19925/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19925/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:38.570 [print] {
"resourceType": "MedicationAdministration",
"id": "19925",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:41.704+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC06",
"display": "Capecitabina"
}
]
},
"effectivePeriod": {
"start": "2017-06-06",
"end": "2015-10-01"
}
}
> *
print COOKIES
10:44:38.570 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:38.571 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:38.571 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cVIk3Tphdjl4MCzS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19925/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19925/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:38.571 [print] {
"resourceType": "MedicationAdministration",
"id": "19925",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:41.704+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC06",
"display": "Capecitabina"
}
]
},
"effectivePeriod": {
"start": "2017-06-06",
"end": "2015-10-01"
}
}
> *
print COOKIES
10:44:38.571 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:39.192 [print] {
"resourceType": "MedicationAdministration",
"id": "19925",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:41.704+02:00",
"source": "#cVIk3Tphdjl4MCzS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC06",
"display": "Capecitabina"
}
]
},
"effectivePeriod": {
"start": "2017-06-06",
"end": "2015-10-01"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:39.800 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:40.433 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:42.938+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:42.938+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:40.434 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD01",
"display": "Porfimer sodium"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2016-03-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:41.261 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"644"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:41.261 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BDqt2K6jtEZdBbag"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19926/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19926/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:41.261 [print] {
"resourceType": "MedicationAdministration",
"id": "19926",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:44.378+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD01",
"display": "Porfimer sodium"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2016-03-29"
}
}
> *
print COOKIES
10:44:41.261 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:41.262 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"644"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:41.262 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BDqt2K6jtEZdBbag"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19926/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19926/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:41.262 [print] {
"resourceType": "MedicationAdministration",
"id": "19926",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:44.378+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD01",
"display": "Porfimer sodium"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2016-03-29"
}
}
> *
print COOKIES
10:44:41.262 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:41.867 [print] {
"resourceType": "MedicationAdministration",
"id": "19926",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:44.378+02:00",
"source": "#BDqt2K6jtEZdBbag",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XD01",
"display": "Porfimer sodium"
}
]
},
"effectivePeriod": {
"start": "2017-07-07",
"end": "2016-03-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:42.493 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:43.111 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:45.620+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:45.620+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:43.111 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC07",
"display": "Tocilizumab"
}
]
},
"effectivePeriod": {
"start": "2017-07-13",
"end": "2016-05-18"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:43.709 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:43.709 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Zgu0kNVvx5odMj42"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19927/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19927/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:43.709 [print] {
"resourceType": "MedicationAdministration",
"id": "19927",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:46.841+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC07",
"display": "Tocilizumab"
}
]
},
"effectivePeriod": {
"start": "2017-07-13",
"end": "2016-05-18"
}
}
> *
print COOKIES
10:44:43.709 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:43.711 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:43.711 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Zgu0kNVvx5odMj42"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19927/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19927/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:43.711 [print] {
"resourceType": "MedicationAdministration",
"id": "19927",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:46.841+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC07",
"display": "Tocilizumab"
}
]
},
"effectivePeriod": {
"start": "2017-07-13",
"end": "2016-05-18"
}
}
> *
print COOKIES
10:44:43.711 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:44.330 [print] {
"resourceType": "MedicationAdministration",
"id": "19927",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:46.841+02:00",
"source": "#Zgu0kNVvx5odMj42",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC07",
"display": "Tocilizumab"
}
]
},
"effectivePeriod": {
"start": "2017-07-13",
"end": "2016-05-18"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:44.943 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:45.569 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:48.079+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:48.079+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:45.570 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX08",
"display": "Poly ICLC"
}
]
},
"effectivePeriod": {
"start": "2017-08-14",
"end": "2016-06-22"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:46.184 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:46.184 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yIC5RLHajZqLVUlE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19928/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19928/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:46.184 [print] {
"resourceType": "MedicationAdministration",
"id": "19928",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:49.307+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX08",
"display": "Poly ICLC"
}
]
},
"effectivePeriod": {
"start": "2017-08-14",
"end": "2016-06-22"
}
}
> *
print COOKIES
10:44:46.184 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:46.186 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:46.186 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yIC5RLHajZqLVUlE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19928/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19928/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:46.186 [print] {
"resourceType": "MedicationAdministration",
"id": "19928",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:49.307+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX08",
"display": "Poly ICLC"
}
]
},
"effectivePeriod": {
"start": "2017-08-14",
"end": "2016-06-22"
}
}
> *
print COOKIES
10:44:46.186 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:46.784 [print] {
"resourceType": "MedicationAdministration",
"id": "19928",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:49.307+02:00",
"source": "#yIC5RLHajZqLVUlE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX08",
"display": "Poly ICLC"
}
]
},
"effectivePeriod": {
"start": "2017-08-14",
"end": "2016-06-22"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:47.396 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:48.015 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:50.531+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:50.531+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:48.016 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX40",
"display": "Omacetaxine mepesuccinate"
}
]
},
"effectivePeriod": {
"start": "2017-08-29",
"end": "2016-07-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:48.644 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"654"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:48.644 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cMTb6a9rCvskOZr9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19929/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19929/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:48.644 [print] {
"resourceType": "MedicationAdministration",
"id": "19929",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:51.766+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX40",
"display": "Omacetaxine mepesuccinate"
}
]
},
"effectivePeriod": {
"start": "2017-08-29",
"end": "2016-07-29"
}
}
> *
print COOKIES
10:44:48.644 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:48.646 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"654"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:48.646 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cMTb6a9rCvskOZr9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19929/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19929/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:48.646 [print] {
"resourceType": "MedicationAdministration",
"id": "19929",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:51.766+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX40",
"display": "Omacetaxine mepesuccinate"
}
]
},
"effectivePeriod": {
"start": "2017-08-29",
"end": "2016-07-29"
}
}
> *
print COOKIES
10:44:48.646 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:49.258 [print] {
"resourceType": "MedicationAdministration",
"id": "19929",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:51.766+02:00",
"source": "#cMTb6a9rCvskOZr9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX40",
"display": "Omacetaxine mepesuccinate"
}
]
},
"effectivePeriod": {
"start": "2017-08-29",
"end": "2016-07-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:49.905 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:50.502 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:53.038+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:53.038+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:50.504 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX44",
"display": "Aflibercept"
}
]
},
"effectivePeriod": {
"start": "2017-10-19",
"end": "2017-01-31"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:51.103 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:51.103 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xgpOZioGsxwRRFcC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19930/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19930/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:51.103 [print] {
"resourceType": "MedicationAdministration",
"id": "19930",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:54.235+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX44",
"display": "Aflibercept"
}
]
},
"effectivePeriod": {
"start": "2017-10-19",
"end": "2017-01-31"
}
}
> *
print COOKIES
10:44:51.103 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:51.104 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:51.105 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xgpOZioGsxwRRFcC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19930/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19930/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:51.105 [print] {
"resourceType": "MedicationAdministration",
"id": "19930",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:54.235+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX44",
"display": "Aflibercept"
}
]
},
"effectivePeriod": {
"start": "2017-10-19",
"end": "2017-01-31"
}
}
> *
print COOKIES
10:44:51.105 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:51.754 [print] {
"resourceType": "MedicationAdministration",
"id": "19930",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:54.235+02:00",
"source": "#xgpOZioGsxwRRFcC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX44",
"display": "Aflibercept"
}
]
},
"effectivePeriod": {
"start": "2017-10-19",
"end": "2017-01-31"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:52.371 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:53.006 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:55.499+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:55.499+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:53.008 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB09",
"display": "Valrubicina"
}
]
},
"effectivePeriod": {
"start": "2017-11-17",
"end": "2017-06-06"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:53.646 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:53.646 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yQWg5ni807pOmpIN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19931/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19931/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:53.646 [print] {
"resourceType": "MedicationAdministration",
"id": "19931",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:56.758+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB09",
"display": "Valrubicina"
}
]
},
"effectivePeriod": {
"start": "2017-11-17",
"end": "2017-06-06"
}
}
> *
print COOKIES
10:44:53.646 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:53.647 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:53.647 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yQWg5ni807pOmpIN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19931/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19931/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:53.647 [print] {
"resourceType": "MedicationAdministration",
"id": "19931",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:56.758+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB09",
"display": "Valrubicina"
}
]
},
"effectivePeriod": {
"start": "2017-11-17",
"end": "2017-06-06"
}
}
> *
print COOKIES
10:44:53.647 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:54.238 [print] {
"resourceType": "MedicationAdministration",
"id": "19931",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:56.758+02:00",
"source": "#yQWg5ni807pOmpIN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB09",
"display": "Valrubicina"
}
]
},
"effectivePeriod": {
"start": "2017-11-17",
"end": "2017-06-06"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:54.860 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:55.493 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:44:57.988+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:44:57.988+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:55.494 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA05",
"display": "Vinflunina"
}
]
},
"effectivePeriod": {
"start": "2012-10-09",
"end": "2013-03-06"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:56.111 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:56.111 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4k8uzyigKfopfFSb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19932/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19932/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:56.111 [print] {
"resourceType": "MedicationAdministration",
"id": "19932",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:59.243+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA05",
"display": "Vinflunina"
}
]
},
"effectivePeriod": {
"start": "2012-10-09",
"end": "2013-03-06"
}
}
> *
print COOKIES
10:44:56.111 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:56.113 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:56.113 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4k8uzyigKfopfFSb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19932/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:44:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19932/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:44:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:56.113 [print] {
"resourceType": "MedicationAdministration",
"id": "19932",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:59.243+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA05",
"display": "Vinflunina"
}
]
},
"effectivePeriod": {
"start": "2012-10-09",
"end": "2013-03-06"
}
}
> *
print COOKIES
10:44:56.113 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:56.735 [print] {
"resourceType": "MedicationAdministration",
"id": "19932",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:44:59.243+02:00",
"source": "#4k8uzyigKfopfFSb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CA05",
"display": "Vinflunina"
}
]
},
"effectivePeriod": {
"start": "2012-10-09",
"end": "2013-03-06"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:57.362 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:57.987 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:00.495+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:00.495+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:44:57.988 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX07",
"display": "lonidamina"
}
]
},
"effectivePeriod": {
"start": "2013-03-25",
"end": "2013-05-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:58.602 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:58.602 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ubCo3GGL6Ygb7Y11"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19933/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19933/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:58.602 [print] {
"resourceType": "MedicationAdministration",
"id": "19933",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:01.735+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX07",
"display": "lonidamina"
}
]
},
"effectivePeriod": {
"start": "2013-03-25",
"end": "2013-05-16"
}
}
> *
print COOKIES
10:44:58.602 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:58.604 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:58.604 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ubCo3GGL6Ygb7Y11"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19933/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19933/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:58.604 [print] {
"resourceType": "MedicationAdministration",
"id": "19933",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:01.735+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX07",
"display": "lonidamina"
}
]
},
"effectivePeriod": {
"start": "2013-03-25",
"end": "2013-05-16"
}
}
> *
print COOKIES
10:44:58.604 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:59.237 [print] {
"resourceType": "MedicationAdministration",
"id": "19933",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:01.735+02:00",
"source": "#ubCo3GGL6Ygb7Y11",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX07",
"display": "lonidamina"
}
]
},
"effectivePeriod": {
"start": "2013-03-25",
"end": "2013-05-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:59.893 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:00.496 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:03.014+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:03.014+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:00.497 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE17",
"display": "Axitinib"
}
]
},
"effectivePeriod": {
"start": "2013-04-19",
"end": "2013-08-15"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:01.097 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:01.097 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KBVjuRnlvE81B2i1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19934/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19934/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:01.097 [print] {
"resourceType": "MedicationAdministration",
"id": "19934",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:04.228+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE17",
"display": "Axitinib"
}
]
},
"effectivePeriod": {
"start": "2013-04-19",
"end": "2013-08-15"
}
}
> *
print COOKIES
10:45:01.097 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:01.098 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:01.098 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KBVjuRnlvE81B2i1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19934/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19934/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:01.098 [print] {
"resourceType": "MedicationAdministration",
"id": "19934",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:04.228+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE17",
"display": "Axitinib"
}
]
},
"effectivePeriod": {
"start": "2013-04-19",
"end": "2013-08-15"
}
}
> *
print COOKIES
10:45:01.098 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:01.704 [print] {
"resourceType": "MedicationAdministration",
"id": "19934",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:04.228+02:00",
"source": "#KBVjuRnlvE81B2i1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE17",
"display": "Axitinib"
}
]
},
"effectivePeriod": {
"start": "2013-04-19",
"end": "2013-08-15"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:02.321 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:02.923 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:05.455+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:05.455+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:02.924 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB13",
"display": "Peginterferone beta 1a"
}
]
},
"effectivePeriod": {
"start": "2013-09-16",
"end": "2013-08-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:03.587 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:03.587 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lQ1N7rnxVs7mIS3p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19935/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19935/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:03.587 [print] {
"resourceType": "MedicationAdministration",
"id": "19935",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:06.712+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB13",
"display": "Peginterferone beta 1a"
}
]
},
"effectivePeriod": {
"start": "2013-09-16",
"end": "2013-08-26"
}
}
> *
print COOKIES
10:45:03.587 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:03.588 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:03.588 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lQ1N7rnxVs7mIS3p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19935/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19935/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:03.588 [print] {
"resourceType": "MedicationAdministration",
"id": "19935",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:06.712+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB13",
"display": "Peginterferone beta 1a"
}
]
},
"effectivePeriod": {
"start": "2013-09-16",
"end": "2013-08-26"
}
}
> *
print COOKIES
10:45:03.588 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:04.201 [print] {
"resourceType": "MedicationAdministration",
"id": "19935",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:06.712+02:00",
"source": "#lQ1N7rnxVs7mIS3p",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB13",
"display": "Peginterferone beta 1a"
}
]
},
"effectivePeriod": {
"start": "2013-09-16",
"end": "2013-08-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:04.833 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:05.443 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:07.957+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:07.957+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:05.444 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB04",
"display": "Adalimumab"
}
]
},
"effectivePeriod": {
"start": "2013-11-18",
"end": "2013-08-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:06.055 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:06.055 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Xrqz0p5BiLKxalpW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19936/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19936/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:06.055 [print] {
"resourceType": "MedicationAdministration",
"id": "19936",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:09.188+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB04",
"display": "Adalimumab"
}
]
},
"effectivePeriod": {
"start": "2013-11-18",
"end": "2013-08-29"
}
}
> *
print COOKIES
10:45:06.055 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:06.057 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:06.057 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Xrqz0p5BiLKxalpW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19936/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19936/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:06.057 [print] {
"resourceType": "MedicationAdministration",
"id": "19936",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:09.188+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB04",
"display": "Adalimumab"
}
]
},
"effectivePeriod": {
"start": "2013-11-18",
"end": "2013-08-29"
}
}
> *
print COOKIES
10:45:06.057 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:06.645 [print] {
"resourceType": "MedicationAdministration",
"id": "19936",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:09.188+02:00",
"source": "#Xrqz0p5BiLKxalpW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AB04",
"display": "Adalimumab"
}
]
},
"effectivePeriod": {
"start": "2013-11-18",
"end": "2013-08-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:07.342 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:07.969 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:10.478+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:10.478+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:07.970 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA29",
"display": "Tofacitinib"
}
]
},
"effectivePeriod": {
"start": "2014-06-16",
"end": "2013-11-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:08.594 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:08.594 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PyZdprOmXy6ZXqX9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19937/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19937/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:08.594 [print] {
"resourceType": "MedicationAdministration",
"id": "19937",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:11.729+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA29",
"display": "Tofacitinib"
}
]
},
"effectivePeriod": {
"start": "2014-06-16",
"end": "2013-11-29"
}
}
> *
print COOKIES
10:45:08.594 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:08.596 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:08.596 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PyZdprOmXy6ZXqX9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19937/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19937/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:08.596 [print] {
"resourceType": "MedicationAdministration",
"id": "19937",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:11.729+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA29",
"display": "Tofacitinib"
}
]
},
"effectivePeriod": {
"start": "2014-06-16",
"end": "2013-11-29"
}
}
> *
print COOKIES
10:45:08.596 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:09.208 [print] {
"resourceType": "MedicationAdministration",
"id": "19937",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:11.729+02:00",
"source": "#PyZdprOmXy6ZXqX9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA29",
"display": "Tofacitinib"
}
]
},
"effectivePeriod": {
"start": "2014-06-16",
"end": "2013-11-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:09.863 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:10.463 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:12.983+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:12.983+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:10.464 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB07",
"display": "Mitoxantrone"
}
]
},
"effectivePeriod": {
"start": "2014-12-09",
"end": "2014-01-14"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:11.093 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:11.093 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RZ91SOF2eK04Tr7P"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19938/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19938/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:11.093 [print] {
"resourceType": "MedicationAdministration",
"id": "19938",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:14.219+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB07",
"display": "Mitoxantrone"
}
]
},
"effectivePeriod": {
"start": "2014-12-09",
"end": "2014-01-14"
}
}
> *
print COOKIES
10:45:11.093 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:11.095 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:11.095 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RZ91SOF2eK04Tr7P"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19938/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19938/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:11.095 [print] {
"resourceType": "MedicationAdministration",
"id": "19938",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:14.219+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB07",
"display": "Mitoxantrone"
}
]
},
"effectivePeriod": {
"start": "2014-12-09",
"end": "2014-01-14"
}
}
> *
print COOKIES
10:45:11.095 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:11.715 [print] {
"resourceType": "MedicationAdministration",
"id": "19938",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:14.219+02:00",
"source": "#RZ91SOF2eK04Tr7P",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB07",
"display": "Mitoxantrone"
}
]
},
"effectivePeriod": {
"start": "2014-12-09",
"end": "2014-01-14"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:12.324 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:13.171 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:15.451+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:15.451+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:13.172 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX38",
"display": "Vorinostat"
}
]
},
"effectivePeriod": {
"start": "2015-02-06",
"end": "2014-04-01"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:13.797 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:13.797 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8S0UPZuv6sIGHRsq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19939/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19939/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:13.798 [print] {
"resourceType": "MedicationAdministration",
"id": "19939",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:16.932+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX38",
"display": "Vorinostat"
}
]
},
"effectivePeriod": {
"start": "2015-02-06",
"end": "2014-04-01"
}
}
> *
print COOKIES
10:45:13.798 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:13.799 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:13.799 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8S0UPZuv6sIGHRsq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19939/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19939/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:13.799 [print] {
"resourceType": "MedicationAdministration",
"id": "19939",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:16.932+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX38",
"display": "Vorinostat"
}
]
},
"effectivePeriod": {
"start": "2015-02-06",
"end": "2014-04-01"
}
}
> *
print COOKIES
10:45:13.799 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:14.415 [print] {
"resourceType": "MedicationAdministration",
"id": "19939",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:16.932+02:00",
"source": "#8S0UPZuv6sIGHRsq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX38",
"display": "Vorinostat"
}
]
},
"effectivePeriod": {
"start": "2015-02-06",
"end": "2014-04-01"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:15.025 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:15.629 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:18.154+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:18.154+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:15.632 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA01",
"display": "Cisplatino"
}
]
},
"effectivePeriod": {
"start": "2015-05-07",
"end": "2014-07-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:16.231 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:16.231 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"slTxnKEPxb3y41Tm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19940/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19940/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:16.231 [print] {
"resourceType": "MedicationAdministration",
"id": "19940",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:19.361+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA01",
"display": "Cisplatino"
}
]
},
"effectivePeriod": {
"start": "2015-05-07",
"end": "2014-07-11"
}
}
> *
print COOKIES
10:45:16.231 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:16.232 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:16.232 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"slTxnKEPxb3y41Tm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19940/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19940/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:16.232 [print] {
"resourceType": "MedicationAdministration",
"id": "19940",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:19.361+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA01",
"display": "Cisplatino"
}
]
},
"effectivePeriod": {
"start": "2015-05-07",
"end": "2014-07-11"
}
}
> *
print COOKIES
10:45:16.232 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:16.851 [print] {
"resourceType": "MedicationAdministration",
"id": "19940",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:19.361+02:00",
"source": "#slTxnKEPxb3y41Tm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XA01",
"display": "Cisplatino"
}
]
},
"effectivePeriod": {
"start": "2015-05-07",
"end": "2014-07-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:17.474 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:18.081 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:20.611+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:20.611+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:18.083 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX06",
"display": "Pomalidomide"
}
]
},
"effectivePeriod": {
"start": "2015-05-25",
"end": "2014-09-03"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:18.690 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:18.690 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DeyK0z80Gj8iR2Pp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19941/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19941/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:18.690 [print] {
"resourceType": "MedicationAdministration",
"id": "19941",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:21.822+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX06",
"display": "Pomalidomide"
}
]
},
"effectivePeriod": {
"start": "2015-05-25",
"end": "2014-09-03"
}
}
> *
print COOKIES
10:45:18.690 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:18.693 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:18.693 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DeyK0z80Gj8iR2Pp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19941/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19941/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:18.693 [print] {
"resourceType": "MedicationAdministration",
"id": "19941",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:21.822+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX06",
"display": "Pomalidomide"
}
]
},
"effectivePeriod": {
"start": "2015-05-25",
"end": "2014-09-03"
}
}
> *
print COOKIES
10:45:18.693 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:19.287 [print] {
"resourceType": "MedicationAdministration",
"id": "19941",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:21.822+02:00",
"source": "#DeyK0z80Gj8iR2Pp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AX06",
"display": "Pomalidomide"
}
]
},
"effectivePeriod": {
"start": "2015-05-25",
"end": "2014-09-03"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:19.878 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:20.477 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:23.015+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:23.015+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:20.478 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB05",
"display": "Interferone alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2015-05-29",
"end": "2015-03-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:21.092 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:21.092 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CH70Z2TfOWZ5nD3m"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19942/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19942/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:21.092 [print] {
"resourceType": "MedicationAdministration",
"id": "19942",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:24.222+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB05",
"display": "Interferone alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2015-05-29",
"end": "2015-03-16"
}
}
> *
print COOKIES
10:45:21.092 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:21.094 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:21.094 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CH70Z2TfOWZ5nD3m"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19942/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19942/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:21.094 [print] {
"resourceType": "MedicationAdministration",
"id": "19942",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:24.222+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB05",
"display": "Interferone alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2015-05-29",
"end": "2015-03-16"
}
}
> *
print COOKIES
10:45:21.094 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:21.739 [print] {
"resourceType": "MedicationAdministration",
"id": "19942",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:24.222+02:00",
"source": "#CH70Z2TfOWZ5nD3m",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB05",
"display": "Interferone alfa-2b"
}
]
},
"effectivePeriod": {
"start": "2015-05-29",
"end": "2015-03-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:22.393 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:23.260 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:25.521+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:25.521+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:23.261 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE03",
"display": "Erlotinib "
}
]
},
"effectivePeriod": {
"start": "2015-07-23",
"end": "2015-04-07"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:23.894 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:23.894 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"w0Ccn2y7mcVUwVgZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19943/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19943/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:23.894 [print] {
"resourceType": "MedicationAdministration",
"id": "19943",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:27.028+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE03",
"display": "Erlotinib "
}
]
},
"effectivePeriod": {
"start": "2015-07-23",
"end": "2015-04-07"
}
}
> *
print COOKIES
10:45:23.894 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:23.896 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:23.896 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"w0Ccn2y7mcVUwVgZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19943/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19943/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:23.896 [print] {
"resourceType": "MedicationAdministration",
"id": "19943",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:27.028+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE03",
"display": "Erlotinib "
}
]
},
"effectivePeriod": {
"start": "2015-07-23",
"end": "2015-04-07"
}
}
> *
print COOKIES
10:45:23.896 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:24.620 [print] {
"resourceType": "MedicationAdministration",
"id": "19943",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:27.028+02:00",
"source": "#w0Ccn2y7mcVUwVgZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE03",
"display": "Erlotinib "
}
]
},
"effectivePeriod": {
"start": "2015-07-23",
"end": "2015-04-07"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:25.227 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:25.832 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:28.358+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:28.358+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:25.834 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD04",
"display": "Cabazitaxel"
}
]
},
"effectivePeriod": {
"start": "2015-09-22",
"end": "2015-07-13"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:27.058 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:27.059 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"br2sxyQAfjAU10Tp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19944/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19944/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:27.059 [print] {
"resourceType": "MedicationAdministration",
"id": "19944",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:30.187+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD04",
"display": "Cabazitaxel"
}
]
},
"effectivePeriod": {
"start": "2015-09-22",
"end": "2015-07-13"
}
}
> *
print COOKIES
10:45:27.059 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:27.061 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:27.061 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"br2sxyQAfjAU10Tp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19944/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19944/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:27.061 [print] {
"resourceType": "MedicationAdministration",
"id": "19944",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:30.187+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD04",
"display": "Cabazitaxel"
}
]
},
"effectivePeriod": {
"start": "2015-09-22",
"end": "2015-07-13"
}
}
> *
print COOKIES
10:45:27.061 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:27.696 [print] {
"resourceType": "MedicationAdministration",
"id": "19944",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:30.187+02:00",
"source": "#br2sxyQAfjAU10Tp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01CD04",
"display": "Cabazitaxel"
}
]
},
"effectivePeriod": {
"start": "2015-09-22",
"end": "2015-07-13"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:28.309 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:28.911 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:31.446+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:31.446+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:28.912 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE01",
"display": "Imatinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-23",
"end": "2015-08-04"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:29.553 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:29.553 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xBhgKra7vdwAHUii"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19945/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19945/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:29.553 [print] {
"resourceType": "MedicationAdministration",
"id": "19945",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:32.669+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE01",
"display": "Imatinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-23",
"end": "2015-08-04"
}
}
> *
print COOKIES
10:45:29.553 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:29.554 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:29.554 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xBhgKra7vdwAHUii"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19945/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19945/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:29.554 [print] {
"resourceType": "MedicationAdministration",
"id": "19945",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:32.669+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE01",
"display": "Imatinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-23",
"end": "2015-08-04"
}
}
> *
print COOKIES
10:45:29.554 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:30.147 [print] {
"resourceType": "MedicationAdministration",
"id": "19945",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:32.669+02:00",
"source": "#xBhgKra7vdwAHUii",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE01",
"display": "Imatinib"
}
]
},
"effectivePeriod": {
"start": "2015-09-23",
"end": "2015-08-04"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:30.779 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:31.372 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:33.915+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:33.915+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:31.374 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX09",
"display": "Milteforina"
}
]
},
"effectivePeriod": {
"start": "2015-09-24",
"end": "2015-10-05"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:32.011 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:32.011 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ejyigTf6NTIbd2fV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19946/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19946/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:32.011 [print] {
"resourceType": "MedicationAdministration",
"id": "19946",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:35.127+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX09",
"display": "Milteforina"
}
]
},
"effectivePeriod": {
"start": "2015-09-24",
"end": "2015-10-05"
}
}
> *
print COOKIES
10:45:32.011 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:32.012 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:32.012 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ejyigTf6NTIbd2fV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19946/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19946/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:32.012 [print] {
"resourceType": "MedicationAdministration",
"id": "19946",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:35.127+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX09",
"display": "Milteforina"
}
]
},
"effectivePeriod": {
"start": "2015-09-24",
"end": "2015-10-05"
}
}
> *
print COOKIES
10:45:32.012 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:32.638 [print] {
"resourceType": "MedicationAdministration",
"id": "19946",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:35.127+02:00",
"source": "#ejyigTf6NTIbd2fV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX09",
"display": "Milteforina"
}
]
},
"effectivePeriod": {
"start": "2015-09-24",
"end": "2015-10-05"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:33.268 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:34.105 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:36.391+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:36.391+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:34.107 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX42",
"display": "Panobinostat"
}
]
},
"effectivePeriod": {
"start": "2015-10-13",
"end": "2015-12-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:34.719 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:34.719 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ODsxY1DmqrG8f2Gz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19947/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19947/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:34.719 [print] {
"resourceType": "MedicationAdministration",
"id": "19947",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:37.853+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX42",
"display": "Panobinostat"
}
]
},
"effectivePeriod": {
"start": "2015-10-13",
"end": "2015-12-11"
}
}
> *
print COOKIES
10:45:34.719 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:34.720 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:34.720 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ODsxY1DmqrG8f2Gz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19947/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19947/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:34.720 [print] {
"resourceType": "MedicationAdministration",
"id": "19947",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:37.853+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX42",
"display": "Panobinostat"
}
]
},
"effectivePeriod": {
"start": "2015-10-13",
"end": "2015-12-11"
}
}
> *
print COOKIES
10:45:34.720 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:35.600 [print] {
"resourceType": "MedicationAdministration",
"id": "19947",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:37.853+02:00",
"source": "#ODsxY1DmqrG8f2Gz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX42",
"display": "Panobinostat"
}
]
},
"effectivePeriod": {
"start": "2015-10-13",
"end": "2015-12-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:36.219 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:36.848 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:39.350+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:39.350+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:36.849 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA33",
"display": "Vedolizumab"
}
]
},
"effectivePeriod": {
"start": "2015-10-15",
"end": "2015-12-29"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:37.931 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:37.931 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"upLEGHMiRYgaFW8s"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19948/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19948/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:37.931 [print] {
"resourceType": "MedicationAdministration",
"id": "19948",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:41.065+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA33",
"display": "Vedolizumab"
}
]
},
"effectivePeriod": {
"start": "2015-10-15",
"end": "2015-12-29"
}
}
> *
print COOKIES
10:45:37.931 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:37.933 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:37.933 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"upLEGHMiRYgaFW8s"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19948/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19948/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:37.933 [print] {
"resourceType": "MedicationAdministration",
"id": "19948",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:41.065+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA33",
"display": "Vedolizumab"
}
]
},
"effectivePeriod": {
"start": "2015-10-15",
"end": "2015-12-29"
}
}
> *
print COOKIES
10:45:37.933 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:38.558 [print] {
"resourceType": "MedicationAdministration",
"id": "19948",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:41.065+02:00",
"source": "#upLEGHMiRYgaFW8s",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA33",
"display": "Vedolizumab"
}
]
},
"effectivePeriod": {
"start": "2015-10-15",
"end": "2015-12-29"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:39.199 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:39.824 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:42.329+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:42.329+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:39.825 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX19",
"display": "Irinotecan "
}
]
},
"effectivePeriod": {
"start": "2015-11-16",
"end": "2016-01-05"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:40.420 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:40.420 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nPj9BJ1UkNnvC6Zz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19949/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19949/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:40.420 [print] {
"resourceType": "MedicationAdministration",
"id": "19949",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:43.553+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX19",
"display": "Irinotecan "
}
]
},
"effectivePeriod": {
"start": "2015-11-16",
"end": "2016-01-05"
}
}
> *
print COOKIES
10:45:40.420 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:40.423 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:40.423 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nPj9BJ1UkNnvC6Zz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19949/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19949/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:40.423 [print] {
"resourceType": "MedicationAdministration",
"id": "19949",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:43.553+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX19",
"display": "Irinotecan "
}
]
},
"effectivePeriod": {
"start": "2015-11-16",
"end": "2016-01-05"
}
}
> *
print COOKIES
10:45:40.423 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:41.024 [print] {
"resourceType": "MedicationAdministration",
"id": "19949",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:43.553+02:00",
"source": "#nPj9BJ1UkNnvC6Zz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX19",
"display": "Irinotecan "
}
]
},
"effectivePeriod": {
"start": "2015-11-16",
"end": "2016-01-05"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:41.640 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:42.251 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:44.777+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:44.777+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:42.253 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB02",
"display": "Treosulfano"
}
]
},
"effectivePeriod": {
"start": "2015-12-14",
"end": "2016-01-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:42.868 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:42.868 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8Xm7uQpxDxYMLcg8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19950/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19950/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:42.868 [print] {
"resourceType": "MedicationAdministration",
"id": "19950",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:46.003+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB02",
"display": "Treosulfano"
}
]
},
"effectivePeriod": {
"start": "2015-12-14",
"end": "2016-01-26"
}
}
> *
print COOKIES
10:45:42.868 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:42.870 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:42.870 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8Xm7uQpxDxYMLcg8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19950/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19950/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:42.870 [print] {
"resourceType": "MedicationAdministration",
"id": "19950",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:46.003+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB02",
"display": "Treosulfano"
}
]
},
"effectivePeriod": {
"start": "2015-12-14",
"end": "2016-01-26"
}
}
> *
print COOKIES
10:45:42.870 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:43.486 [print] {
"resourceType": "MedicationAdministration",
"id": "19950",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:46.003+02:00",
"source": "#8Xm7uQpxDxYMLcg8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01AB02",
"display": "Treosulfano"
}
]
},
"effectivePeriod": {
"start": "2015-12-14",
"end": "2016-01-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:44.106 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:44.729 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:47.234+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:47.234+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:44.731 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB09",
"display": "Interferone alfacon-1"
}
]
},
"effectivePeriod": {
"start": "2016-01-21",
"end": "2016-02-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:46.619 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"650"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:46.619 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IieF6O2rbPNH7x5W"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19951/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19951/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:46.619 [print] {
"resourceType": "MedicationAdministration",
"id": "19951",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:49.756+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB09",
"display": "Interferone alfacon-1"
}
]
},
"effectivePeriod": {
"start": "2016-01-21",
"end": "2016-02-11"
}
}
> *
print COOKIES
10:45:46.619 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:46.620 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"650"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:46.620 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IieF6O2rbPNH7x5W"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19951/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19951/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:46.621 [print] {
"resourceType": "MedicationAdministration",
"id": "19951",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:49.756+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB09",
"display": "Interferone alfacon-1"
}
]
},
"effectivePeriod": {
"start": "2016-01-21",
"end": "2016-02-11"
}
}
> *
print COOKIES
10:45:46.621 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:47.247 [print] {
"resourceType": "MedicationAdministration",
"id": "19951",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:49.756+02:00",
"source": "#IieF6O2rbPNH7x5W",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB09",
"display": "Interferone alfacon-1"
}
]
},
"effectivePeriod": {
"start": "2016-01-21",
"end": "2016-02-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:47.874 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:48.502 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:51.004+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:51.004+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:48.503 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC12",
"display": "Brentuximab vedotin"
}
]
},
"effectivePeriod": {
"start": "2016-08-17",
"end": "2016-08-03"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:49.132 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:49.132 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3iN7ijnPYhXdjrxR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19952/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19952/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:49.132 [print] {
"resourceType": "MedicationAdministration",
"id": "19952",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:52.263+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC12",
"display": "Brentuximab vedotin"
}
]
},
"effectivePeriod": {
"start": "2016-08-17",
"end": "2016-08-03"
}
}
> *
print COOKIES
10:45:49.132 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:49.134 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"648"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:49.134 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3iN7ijnPYhXdjrxR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19952/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19952/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:49.134 [print] {
"resourceType": "MedicationAdministration",
"id": "19952",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:52.263+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC12",
"display": "Brentuximab vedotin"
}
]
},
"effectivePeriod": {
"start": "2016-08-17",
"end": "2016-08-03"
}
}
> *
print COOKIES
10:45:49.134 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:49.780 [print] {
"resourceType": "MedicationAdministration",
"id": "19952",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:52.263+02:00",
"source": "#3iN7ijnPYhXdjrxR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC12",
"display": "Brentuximab vedotin"
}
]
},
"effectivePeriod": {
"start": "2016-08-17",
"end": "2016-08-03"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:50.413 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:51.029 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:53.549+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:53.549+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:51.032 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB11",
"display": "Pixantrone"
}
]
},
"effectivePeriod": {
"start": "2016-12-27",
"end": "2016-10-24"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:51.661 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:51.661 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gGydvKtVtZfUdVKU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19953/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19953/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:51.661 [print] {
"resourceType": "MedicationAdministration",
"id": "19953",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:54.788+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB11",
"display": "Pixantrone"
}
]
},
"effectivePeriod": {
"start": "2016-12-27",
"end": "2016-10-24"
}
}
> *
print COOKIES
10:45:51.661 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:51.662 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:51.662 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gGydvKtVtZfUdVKU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19953/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19953/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:51.662 [print] {
"resourceType": "MedicationAdministration",
"id": "19953",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:54.788+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB11",
"display": "Pixantrone"
}
]
},
"effectivePeriod": {
"start": "2016-12-27",
"end": "2016-10-24"
}
}
> *
print COOKIES
10:45:51.662 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:52.320 [print] {
"resourceType": "MedicationAdministration",
"id": "19953",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:54.788+02:00",
"source": "#gGydvKtVtZfUdVKU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DB11",
"display": "Pixantrone"
}
]
},
"effectivePeriod": {
"start": "2016-12-27",
"end": "2016-10-24"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:52.950 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:53.846 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:56.078+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:56.078+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:53.848 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX23",
"display": "Mitotano"
}
]
},
"effectivePeriod": {
"start": "2017-02-02",
"end": "2016-10-26"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:54.690 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:54.690 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GDO1C62C7jijVLGz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19954/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19954/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:54.690 [print] {
"resourceType": "MedicationAdministration",
"id": "19954",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:57.821+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX23",
"display": "Mitotano"
}
]
},
"effectivePeriod": {
"start": "2017-02-02",
"end": "2016-10-26"
}
}
> *
print COOKIES
10:45:54.690 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:54.691 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:54.691 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GDO1C62C7jijVLGz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19954/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:45:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19954/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:45:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:54.692 [print] {
"resourceType": "MedicationAdministration",
"id": "19954",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:57.821+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX23",
"display": "Mitotano"
}
]
},
"effectivePeriod": {
"start": "2017-02-02",
"end": "2016-10-26"
}
}
> *
print COOKIES
10:45:54.692 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:55.356 [print] {
"resourceType": "MedicationAdministration",
"id": "19954",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:45:57.821+02:00",
"source": "#GDO1C62C7jijVLGz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX23",
"display": "Mitotano"
}
]
},
"effectivePeriod": {
"start": "2017-02-02",
"end": "2016-10-26"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:55.980 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:56.584 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:45:59.116+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:45:59.116+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:56.586 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA28",
"display": "Belatacept"
}
]
},
"effectivePeriod": {
"start": "2017-02-21",
"end": "2017-07-19"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:57.198 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:57.198 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FGesVLLf2dLTOwDm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19955/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19955/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:57.198 [print] {
"resourceType": "MedicationAdministration",
"id": "19955",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:00.329+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA28",
"display": "Belatacept"
}
]
},
"effectivePeriod": {
"start": "2017-02-21",
"end": "2017-07-19"
}
}
> *
print COOKIES
10:45:57.198 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:57.200 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:57.200 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FGesVLLf2dLTOwDm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19955/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19955/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:57.200 [print] {
"resourceType": "MedicationAdministration",
"id": "19955",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:00.329+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA28",
"display": "Belatacept"
}
]
},
"effectivePeriod": {
"start": "2017-02-21",
"end": "2017-07-19"
}
}
> *
print COOKIES
10:45:57.200 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:57.803 [print] {
"resourceType": "MedicationAdministration",
"id": "19955",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:00.329+02:00",
"source": "#FGesVLLf2dLTOwDm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA28",
"display": "Belatacept"
}
]
},
"effectivePeriod": {
"start": "2017-02-21",
"end": "2017-07-19"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:58.438 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:59.060 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:46:01.574+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:46:01.574+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:45:59.062 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AA02",
"display": "Stradurin"
}
]
},
"effectivePeriod": {
"start": "2017-06-19",
"end": "2017-12-14"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:59.670 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:59.670 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Oc428BOtYN2CGwJu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19956/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19956/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:59.670 [print] {
"resourceType": "MedicationAdministration",
"id": "19956",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:02.806+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AA02",
"display": "Stradurin"
}
]
},
"effectivePeriod": {
"start": "2017-06-19",
"end": "2017-12-14"
}
}
> *
print COOKIES
10:45:59.670 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:59.671 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"638"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:59.671 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Oc428BOtYN2CGwJu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19956/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19956/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:59.672 [print] {
"resourceType": "MedicationAdministration",
"id": "19956",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:02.806+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AA02",
"display": "Stradurin"
}
]
},
"effectivePeriod": {
"start": "2017-06-19",
"end": "2017-12-14"
}
}
> *
print COOKIES
10:45:59.672 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:00.272 [print] {
"resourceType": "MedicationAdministration",
"id": "19956",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:02.806+02:00",
"source": "#Oc428BOtYN2CGwJu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L02AA02",
"display": "Stradurin"
}
]
},
"effectivePeriod": {
"start": "2017-06-19",
"end": "2017-12-14"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:00.937 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:01.555 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:46:04.065+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:46:04.065+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:46:01.556 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC01",
"display": "Bleomicina "
}
]
},
"effectivePeriod": {
"start": "2013-03-05",
"end": "2015-09-11"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:02.177 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:02.177 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tnT7ZiI3vChqPSer"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19957/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19957/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:02.177 [print] {
"resourceType": "MedicationAdministration",
"id": "19957",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:05.315+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC01",
"display": "Bleomicina "
}
]
},
"effectivePeriod": {
"start": "2013-03-05",
"end": "2015-09-11"
}
}
> *
print COOKIES
10:46:02.177 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:02.179 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:02.179 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tnT7ZiI3vChqPSer"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19957/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19957/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:02.179 [print] {
"resourceType": "MedicationAdministration",
"id": "19957",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:05.315+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC01",
"display": "Bleomicina "
}
]
},
"effectivePeriod": {
"start": "2013-03-05",
"end": "2015-09-11"
}
}
> *
print COOKIES
10:46:02.179 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:03.047 [print] {
"resourceType": "MedicationAdministration",
"id": "19957",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:05.315+02:00",
"source": "#tnT7ZiI3vChqPSer",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01DC01",
"display": "Bleomicina "
}
]
},
"effectivePeriod": {
"start": "2013-03-05",
"end": "2015-09-11"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:03.661 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:04.297 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:46:06.793+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:46:06.793+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:46:04.299 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA18",
"display": "Everolimus"
}
]
},
"effectivePeriod": {
"start": "2013-05-14",
"end": "2016-05-16"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:04.899 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:04.899 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CsTiF3U8NXlUGrQp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19958/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19958/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:04.899 [print] {
"resourceType": "MedicationAdministration",
"id": "19958",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:08.035+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA18",
"display": "Everolimus"
}
]
},
"effectivePeriod": {
"start": "2013-05-14",
"end": "2016-05-16"
}
}
> *
print COOKIES
10:46:04.899 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:04.900 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:04.901 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CsTiF3U8NXlUGrQp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19958/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19958/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:04.901 [print] {
"resourceType": "MedicationAdministration",
"id": "19958",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:08.035+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA18",
"display": "Everolimus"
}
]
},
"effectivePeriod": {
"start": "2013-05-14",
"end": "2016-05-16"
}
}
> *
print COOKIES
10:46:04.901 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:05.953 [print] {
"resourceType": "MedicationAdministration",
"id": "19958",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:08.035+02:00",
"source": "#CsTiF3U8NXlUGrQp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AA18",
"display": "Everolimus"
}
]
},
"effectivePeriod": {
"start": "2013-05-14",
"end": "2016-05-16"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:06.581 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 15ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 15ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:07.211 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:46:09.696+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:46:09.696+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:46:07.213 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX17",
"display": "Sipuleucel-T"
}
]
},
"effectivePeriod": {
"start": "2013-07-03",
"end": "2016-05-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:07.837 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:07.837 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"POj0wAUmgZ0dKReR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19959/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19959/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:07.837 [print] {
"resourceType": "MedicationAdministration",
"id": "19959",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:10.959+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX17",
"display": "Sipuleucel-T"
}
]
},
"effectivePeriod": {
"start": "2013-07-03",
"end": "2016-05-23"
}
}
> *
print COOKIES
10:46:07.837 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:07.838 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"641"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:07.838 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"POj0wAUmgZ0dKReR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19959/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19959/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:07.838 [print] {
"resourceType": "MedicationAdministration",
"id": "19959",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:10.959+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX17",
"display": "Sipuleucel-T"
}
]
},
"effectivePeriod": {
"start": "2013-07-03",
"end": "2016-05-23"
}
}
> *
print COOKIES
10:46:07.838 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:09.447 [print] {
"resourceType": "MedicationAdministration",
"id": "19959",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:10.959+02:00",
"source": "#POj0wAUmgZ0dKReR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AX17",
"display": "Sipuleucel-T"
}
]
},
"effectivePeriod": {
"start": "2013-07-03",
"end": "2016-05-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:10.062 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:10.669 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:46:13.197+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:46:13.197+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:46:10.670 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB03",
"display": "Interferone gamma-1b"
}
]
},
"effectivePeriod": {
"start": "2014-01-15",
"end": "2016-06-21"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:11.299 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"649"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:11.299 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vV5liMrWGTqeB15G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19960/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19960/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:11.299 [print] {
"resourceType": "MedicationAdministration",
"id": "19960",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:14.432+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB03",
"display": "Interferone gamma-1b"
}
]
},
"effectivePeriod": {
"start": "2014-01-15",
"end": "2016-06-21"
}
}
> *
print COOKIES
10:46:11.299 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:11.301 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"649"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:11.301 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vV5liMrWGTqeB15G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19960/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19960/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:11.301 [print] {
"resourceType": "MedicationAdministration",
"id": "19960",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:14.432+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB03",
"display": "Interferone gamma-1b"
}
]
},
"effectivePeriod": {
"start": "2014-01-15",
"end": "2016-06-21"
}
}
> *
print COOKIES
10:46:11.301 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:11.917 [print] {
"resourceType": "MedicationAdministration",
"id": "19960",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:14.432+02:00",
"source": "#vV5liMrWGTqeB15G",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L03AB03",
"display": "Interferone gamma-1b"
}
]
},
"effectivePeriod": {
"start": "2014-01-15",
"end": "2016-06-21"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:12.762 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:13.398 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:46:15.898+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:46:15.898+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:46:13.399 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC18",
"display": "Pembrolizumab"
}
]
},
"effectivePeriod": {
"start": "2014-06-20",
"end": "2016-07-06"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:14.047 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:14.047 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8ToEW2yMDLO5Hino"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19961/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19961/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:14.047 [print] {
"resourceType": "MedicationAdministration",
"id": "19961",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:17.180+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC18",
"display": "Pembrolizumab"
}
]
},
"effectivePeriod": {
"start": "2014-06-20",
"end": "2016-07-06"
}
}
> *
print COOKIES
10:46:14.047 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:14.049 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:14.049 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8ToEW2yMDLO5Hino"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19961/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19961/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:14.049 [print] {
"resourceType": "MedicationAdministration",
"id": "19961",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:17.180+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC18",
"display": "Pembrolizumab"
}
]
},
"effectivePeriod": {
"start": "2014-06-20",
"end": "2016-07-06"
}
}
> *
print COOKIES
10:46:14.049 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:14.651 [print] {
"resourceType": "MedicationAdministration",
"id": "19961",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:17.180+02:00",
"source": "#8ToEW2yMDLO5Hino",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC18",
"display": "Pembrolizumab"
}
]
},
"effectivePeriod": {
"start": "2014-06-20",
"end": "2016-07-06"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:15.253 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:15.868 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:46:18.384+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:46:18.384+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:46:15.870 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC05",
"display": "Gemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-08-19",
"end": "2016-12-07"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:16.520 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:16.520 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BAlrCxTiI7lSGMj5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19962/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19962/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:16.520 [print] {
"resourceType": "MedicationAdministration",
"id": "19962",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:19.635+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC05",
"display": "Gemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-08-19",
"end": "2016-12-07"
}
}
> *
print COOKIES
10:46:16.520 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:16.522 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:16.522 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BAlrCxTiI7lSGMj5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19962/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19962/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:16.522 [print] {
"resourceType": "MedicationAdministration",
"id": "19962",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:19.635+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC05",
"display": "Gemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-08-19",
"end": "2016-12-07"
}
}
> *
print COOKIES
10:46:16.522 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:17.133 [print] {
"resourceType": "MedicationAdministration",
"id": "19962",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:19.635+02:00",
"source": "#BAlrCxTiI7lSGMj5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XC05",
"display": "Gemtuzumab"
}
]
},
"effectivePeriod": {
"start": "2014-08-19",
"end": "2016-12-07"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:17.775 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:19.424 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:46:20.896+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:46:20.896+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:46:19.425 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX47",
"display": "Idelalisib"
}
]
},
"effectivePeriod": {
"start": "2014-12-17",
"end": "2017-02-17"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:20.038 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:20.038 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8aGSZ8ELK38MbsYG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19963/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19963/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:20.038 [print] {
"resourceType": "MedicationAdministration",
"id": "19963",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:23.164+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX47",
"display": "Idelalisib"
}
]
},
"effectivePeriod": {
"start": "2014-12-17",
"end": "2017-02-17"
}
}
> *
print COOKIES
10:46:20.038 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:20.040 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:20.040 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8aGSZ8ELK38MbsYG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19963/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19963/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:20.040 [print] {
"resourceType": "MedicationAdministration",
"id": "19963",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:23.164+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX47",
"display": "Idelalisib"
}
]
},
"effectivePeriod": {
"start": "2014-12-17",
"end": "2017-02-17"
}
}
> *
print COOKIES
10:46:20.040 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:20.674 [print] {
"resourceType": "MedicationAdministration",
"id": "19963",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:23.164+02:00",
"source": "#8aGSZ8ELK38MbsYG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XX47",
"display": "Idelalisib"
}
]
},
"effectivePeriod": {
"start": "2014-12-17",
"end": "2017-02-17"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:21.280 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:28.601 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:46:24.415+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:46:24.415+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:46:28.603 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC04",
"display": "Rilonacept"
}
]
},
"effectivePeriod": {
"start": "2014-12-30",
"end": "2017-03-14"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:29.217 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:29.217 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bRYTGVY8NNYRnjbv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19964/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19964/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:29.217 [print] {
"resourceType": "MedicationAdministration",
"id": "19964",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:32.350+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC04",
"display": "Rilonacept"
}
]
},
"effectivePeriod": {
"start": "2014-12-30",
"end": "2017-03-14"
}
}
> *
print COOKIES
10:46:29.217 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:29.220 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:29.220 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bRYTGVY8NNYRnjbv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19964/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19964/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:29.220 [print] {
"resourceType": "MedicationAdministration",
"id": "19964",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:32.350+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC04",
"display": "Rilonacept"
}
]
},
"effectivePeriod": {
"start": "2014-12-30",
"end": "2017-03-14"
}
}
> *
print COOKIES
10:46:29.220 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:29.832 [print] {
"resourceType": "MedicationAdministration",
"id": "19964",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:32.350+02:00",
"source": "#bRYTGVY8NNYRnjbv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L04AC04",
"display": "Rilonacept"
}
]
},
"effectivePeriod": {
"start": "2014-12-30",
"end": "2017-03-14"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:30.440 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:31.045 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:46:33.574+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:46:33.574+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:46:31.047 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA03",
"display": "Raltitrexed"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2017-05-01"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:31.675 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:31.675 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7a7xPaeZgFFytw0R"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19965/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19965/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:31.675 [print] {
"resourceType": "MedicationAdministration",
"id": "19965",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:34.803+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA03",
"display": "Raltitrexed"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2017-05-01"
}
}
> *
print COOKIES
10:46:31.675 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:31.677 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:31.677 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7a7xPaeZgFFytw0R"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19965/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19965/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:31.677 [print] {
"resourceType": "MedicationAdministration",
"id": "19965",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:34.803+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA03",
"display": "Raltitrexed"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2017-05-01"
}
}
> *
print COOKIES
10:46:31.677 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:32.309 [print] {
"resourceType": "MedicationAdministration",
"id": "19965",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:34.803+02:00",
"source": "#7a7xPaeZgFFytw0R",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA03",
"display": "Raltitrexed"
}
]
},
"effectivePeriod": {
"start": "2015-02-03",
"end": "2017-05-01"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:32.958 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:33.565 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:46:36.075+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:46:36.075+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:46:33.566 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC05",
"display": "Gemcitabina "
}
]
},
"effectivePeriod": {
"start": "2015-02-17",
"end": "2017-08-21"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:34.238 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:34.238 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RzfdWCpfAIb6H3h8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19966/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19966/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:34.238 [print] {
"resourceType": "MedicationAdministration",
"id": "19966",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:37.347+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC05",
"display": "Gemcitabina "
}
]
},
"effectivePeriod": {
"start": "2015-02-17",
"end": "2017-08-21"
}
}
> *
print COOKIES
10:46:34.238 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:34.240 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:34.240 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RzfdWCpfAIb6H3h8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19966/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19966/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:34.240 [print] {
"resourceType": "MedicationAdministration",
"id": "19966",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:37.347+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC05",
"display": "Gemcitabina "
}
]
},
"effectivePeriod": {
"start": "2015-02-17",
"end": "2017-08-21"
}
}
> *
print COOKIES
10:46:34.240 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:34.847 [print] {
"resourceType": "MedicationAdministration",
"id": "19966",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:37.347+02:00",
"source": "#RzfdWCpfAIb6H3h8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC05",
"display": "Gemcitabina "
}
]
},
"effectivePeriod": {
"start": "2015-02-17",
"end": "2017-08-21"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:35.457 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:36.083 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:46:38.589+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:46:38.589+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:46:36.085 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE16",
"display": "Crizotinib"
}
]
},
"effectivePeriod": {
"start": "2015-02-25",
"end": "2017-08-25"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:36.684 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:36.684 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3ZWtrRoOOpdA8aXj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19967/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19967/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:36.684 [print] {
"resourceType": "MedicationAdministration",
"id": "19967",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:39.817+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE16",
"display": "Crizotinib"
}
]
},
"effectivePeriod": {
"start": "2015-02-25",
"end": "2017-08-25"
}
}
> *
print COOKIES
10:46:36.684 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:36.686 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:36.686 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3ZWtrRoOOpdA8aXj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19967/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19967/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:36.686 [print] {
"resourceType": "MedicationAdministration",
"id": "19967",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:39.817+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE16",
"display": "Crizotinib"
}
]
},
"effectivePeriod": {
"start": "2015-02-25",
"end": "2017-08-25"
}
}
> *
print COOKIES
10:46:36.686 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:37.325 [print] {
"resourceType": "MedicationAdministration",
"id": "19967",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:39.817+02:00",
"source": "#3ZWtrRoOOpdA8aXj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE16",
"display": "Crizotinib"
}
]
},
"effectivePeriod": {
"start": "2015-02-25",
"end": "2017-08-25"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:37.956 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:38.571 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:46:41.079+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:46:41.079+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:46:38.573 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE13",
"display": "Afatinib"
}
]
},
"effectivePeriod": {
"start": "2015-05-14",
"end": "2017-09-22"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:39.196 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:39.196 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TzoFd4Y8M5gUtrK4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19968/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19968/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:39.196 [print] {
"resourceType": "MedicationAdministration",
"id": "19968",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:42.321+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE13",
"display": "Afatinib"
}
]
},
"effectivePeriod": {
"start": "2015-05-14",
"end": "2017-09-22"
}
}
> *
print COOKIES
10:46:39.196 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:39.198 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:39.198 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TzoFd4Y8M5gUtrK4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19968/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19968/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:39.198 [print] {
"resourceType": "MedicationAdministration",
"id": "19968",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:42.321+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE13",
"display": "Afatinib"
}
]
},
"effectivePeriod": {
"start": "2015-05-14",
"end": "2017-09-22"
}
}
> *
print COOKIES
10:46:39.198 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:39.807 [print] {
"resourceType": "MedicationAdministration",
"id": "19968",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:42.321+02:00",
"source": "#TzoFd4Y8M5gUtrK4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01XE13",
"display": "Afatinib"
}
]
},
"effectivePeriod": {
"start": "2015-05-14",
"end": "2017-09-22"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:40.437 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 12ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 12ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:41.053 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:46:43.562+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:46:43.562+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationAdministration
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationAdministration resource.
Given
path '/MedicationAdministration'
And
print resource
10:46:41.053 [print] {
"resourceType": "MedicationAdministration",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB03",
"display": "Tioguanina"
}
]
},
"effectivePeriod": {
"start": "2015-06-25",
"end": "2016-05-23"
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:41.704 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:41.704 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"p4Ay78j9qbWizxAK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19969/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19969/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:41.704 [print] {
"resourceType": "MedicationAdministration",
"id": "19969",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:44.837+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB03",
"display": "Tioguanina"
}
]
},
"effectivePeriod": {
"start": "2015-06-25",
"end": "2016-05-23"
}
}
> *
print COOKIES
10:46:41.704 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:41.706 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"639"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:41.706 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"p4Ay78j9qbWizxAK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19969/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:46:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationAdministration/19969/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:46:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:41.706 [print] {
"resourceType": "MedicationAdministration",
"id": "19969",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:44.837+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB03",
"display": "Tioguanina"
}
]
},
"effectivePeriod": {
"start": "2015-06-25",
"end": "2016-05-23"
}
}
> *
print COOKIES
10:46:41.706 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:42.328 [print] {
"resourceType": "MedicationAdministration",
"id": "19969",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:46:44.837+02:00",
"source": "#p4Ay78j9qbWizxAK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationAdministration-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/resource-relatedInfo",
"valueReference": {
"reference": "Observation/urn:uuid:",
"type": "Observation"
}
}
],
"status": "completed",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BB03",
"display": "Tioguanina"
}
]
},
"effectivePeriod": {
"start": "2015-06-25",
"end": "2016-05-23"
}
}
When
print 'They try to delete the MedicationAdministration resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:42.980 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationAdministration resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:44.617 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:46:46.102+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:46:46.102+02:00"
}
]
}